[13336] in Perl-Users-Digest
Perl-Users Digest, Issue: 746 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 9 05:07:51 1999
Date: Thu, 9 Sep 1999 02:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 9 Sep 1999 Volume: 9 Number: 746
Today's topics:
Re: "Use of unitialized value" when it looks pretty ini <rick.delaney@home.com>
Re: <== Getting the Database Column Names with DBD::ODB <jeff@vpservices.com>
back for more sorting abuse <corlando@NOTpop.phnx.uswest.net>
Re: back for more sorting abuse <uri@sysarch.com>
Re: bin2hex and back again (Fabien Tassin)
Re: CGI scripts that dont return headers <ehpoole@ingress.com>
Format a var to 2 decimal places!! <rich.harris@#prodigy.net>
Re: Format a var to 2 decimal places!! (Bill Moseley)
Re: Is My computer busted? <rick.delaney@home.com>
Re: Is My computer busted? <uri@sysarch.com>
Re: Is My computer busted? (Ilya Zakharevich)
Re: Is My computer busted? (Bill Moseley)
Newbie: Perl scripts and permissions <tonyboy@earthling.net>
Re: Newbie: Perl scripts and permissions (Larry Rosler)
Re: perl error codes on NT <ehpoole@ingress.com>
perl question salo2000@my-deja.com
Re: perl.exes hanging around on NT <ehpoole@ingress.com>
Re: Randal vandal aborts Schwartz <gisle@aas.no>
ref to array of ref to arrays <kevin.porter@fast.no>
Running a perl program on Unix and Windows <cliff.lloyd@gov.ab.ca>
Re: Running a perl program on Unix and Windows (Bill Moseley)
Re: Running a perl program on Unix and Windows (Gyepi SAM)
Sorry, Re: Why, why, why, -w and use strict? <phony@nospam.com>
Sorry, Re: Why, why, why, -w and use strict? <phony@nospam.com>
Re: Sorry, Re: Why, why, why, -w and use strict? (Abigail)
use cgi/perl to hide access to subdirectory <andrewl@fire.tas.gov.au>
WHAT IS THE BEST WAY ladlad@my-deja.com
Re: XS and tie <dada@divinf.it>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 09 Sep 1999 03:36:22 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: "Use of unitialized value" when it looks pretty initialized.
Message-Id: <37D72B29.50ED04CA@home.com>
[posted & mailed]
Christopher R. Barry wrote:
>
> I'm repeatedly get this error:
>
> Use of uninitialized value at ./dbi.cgi line 22.
...
> while (@row = $sth->fetchrow_array) {
> print "@row\n"; #line 22
> }
> -------------------
>
> How can the value on line 22 be uninitialized?
@row cannot be uninitialized but some of its elements could be
undefined. Whenever you see that message, that's what it really means.
Perhaps Tom C. should add that to his Geekspeak list:
undefined = uninitialized
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: 9 Sep 1999 04:41:16 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: <== Getting the Database Column Names with DBD::ODBC ==>
Message-Id: <37D7396F.F773D5EC@vpservices.com>
Gyepi SAM wrote:
>
> On 8 Sep 1999 19:57:01 GMT, Jeff Zucker <jeff@vpservices.com> wrote:
> >Kevin Howe wrote:
> >>
> >> I am trying to get the column names of a datasheet in my database using
> >> DBD::ODBC.
> >
> >Try:
> >
> > my $sth = $dbh->prepare("SELECT * FROM $table");
>
> my $sth = $dbh->prepare("SELECT * FROM $table where 1=0");
>
> Will execute faster.
> Much, much faster if your tables are large.
Yep, true, when it works, but it isn't portable. It won't work on alot
of databases.
--
Jeff
------------------------------
Date: Thu, 9 Sep 1999 00:16:49 -0700
From: "rootdog" <corlando@NOTpop.phnx.uswest.net>
Subject: back for more sorting abuse
Message-Id: <X8JB3.877$0o.80412@news.uswest.net>
Ok, after taking my beatings and doing some reading the general solution I
came up with is below. However, the actual file I'll be working with
contains about 400,000 similar records. Is there a faster way?
while( <DATA>) {
$uniq++;
($stock,$desc,$qty) = split;
push @records, {
UNIQ => $uniq, # might need for some reason later
STOCK => $stock,
DESC => $desc,
QTY => $qty
};
}
@srec = sort by_stock_qty @records;
for $rec ( @srec)
{
printf("%s %s %s\n", $rec->{STOCK}, $rec->{DESC} ,$rec->{QTY}) ;
}
sub by_stock_qty {
$a->{STOCK} <=> $b->{STOCK}
||
$a->{QTY} <=> $b->{QTY}
}
__END__
91246 peach 4
91247 grape 6
91246 apple 7
91248 banana 5
91246 avacado 1
------------------------------
Date: 09 Sep 1999 03:51:19 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: back for more sorting abuse
Message-Id: <x7r9k8msjs.fsf@home.sysarch.com>
>>>>> "r" == rootdog <corlando@NOTpop.phnx.uswest.net> writes:
r> Ok, after taking my beatings and doing some reading the general
r> solution I came up with is below. However, the actual file I'll be
r> working with contains about 400,000 similar records. Is there a
r> faster way?
r> @srec = sort by_stock_qty @records;
r> sub by_stock_qty {
r> $a->{STOCK} <=> $b->{STOCK}
r> ||
r> $a->{QTY} <=> $b->{QTY}
r> }
well, you want to eliminate that slow sort sub. time for some more
reading and studying. check out this award winning paper <gloat!> on
faster sorting:
http://www.sysarch.com/perl/sort_paper.html
enjoy,
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 9 Sep 1999 08:37:25 GMT
From: fta@oleane.net (Fabien Tassin)
Subject: Re: bin2hex and back again
Message-Id: <slrn7tese5.k1h.fta@nexus.gen.oleane.fr>
On Wed, 8 Sep 1999 18:59:57 -0300, Kevin Howe <khowe@performance-net.com> wrote:
> I would like to be able to store binary files such as .gif files in my
> databases. I read that this could be done by converting the binary file to
> hexidecimal to store it in the database, and then converting it back
> (hexidecimal to binary) when the item is to be used.
>
> I have found several scripts which convert from binary to hexidecimal
> (binhex.pl, Data::HexDump) but these do not to the conversion back to
> binary.
look at the test file called t/compare.t in Data::HexDump.
It contains a sub called undump which takes the output of a dump
(created by Data::HexDump) and convert it back to binary.
--
Fabien Tassin -+- fta@oleane.net
------------------------------
Date: Thu, 09 Sep 1999 00:23:58 -0400
From: "Ethan H. Poole" <ehpoole@ingress.com>
Subject: Re: CGI scripts that dont return headers
Message-Id: <37D7365E.D257041E@ingress.com>
Alan J. Flavell wrote:
>
> You really should be on the c.i.w.authoring.cgi group for this kind of
> question, it isn't a Perl language issue.
In fairness to the original poster, the c.i.w.a.cgi moderator-bot hasn't
been doing too swift a job lately. I know it deletes about 9/10ths of my
answers to poster's questions (I've had to resort to sending them replies
via email assuming they provided a valid email address). Once upon a time
it was a group where I spent the bulk of my time, lately I question why I
even bother replying to posts on the group when I know there is a 90%
likelihood it will be dropped for no known reason. While some others may
not be encountering the problem, I think it is a reasonable assumption
that if I am experiencing problems with the bot that others almost
certainly are as well.
I really wish Tom Bouttell (sp?) would either fix the moderator-bot or
stop moderating the group. The current bot still allows spam to get
through, but even worse it is eliminating a *lot* of on-topic posts as
well for no apparent reason.
--
Ethan H. Poole **** BUSINESS ****
ehpoole@ingress.com ==Interact2Day, Inc.==
(personal) http://www.interact2day.com/
------------------------------
Date: Wed, 8 Sep 1999 20:50:03 -0400
From: "Rich Harris" <rich.harris@#prodigy.net>
Subject: Format a var to 2 decimal places!!
Message-Id: <7r70cq$5kt4$1@newssvr04-int.news.prodigy.com>
I'm sorry this has got to be a simple one, but I can't do it.
How do you format a variable to 1 or 2 decimal places?
Also are there any good sites out there which list perl commands etc.
Thanks
Rich
------------------------------
Date: Wed, 8 Sep 1999 20:34:28 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Format a var to 2 decimal places!!
Message-Id: <MPG.1240caa291ea7f50989727@nntp1.ba.best.com>
Rich Harris (rich.harris@#prodigy.net) seems to say...
> I'm sorry this has got to be a simple one, but I can't do it.
>
> How do you format a variable to 1 or 2 decimal places?
I'd bet that's in the FAQ someplace.
perldoc -f sprintf
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Thu, 09 Sep 1999 04:01:57 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Is My computer busted?
Message-Id: <37D73123.9BE5C015@home.com>
[posted & mailed]
Uri Guttman wrote:
>
> >>>>> "BM" == Bill Moseley <moseley@best.com> writes:
>
> BM> eval { flock( FH, LOCK_SH) or die "$!\n" }
> BM> or print "LOCK_SH reported '$@'\n";
> BM> print "Done.\n";
>
> the first lock worked in exclusive mode so this share lock failed.
Why? I don't see any fork before that. I don't have access to a
Solaris box but I suspect he'd get the same error if he removed the
LOCK_EX code. I suspect this because I get that on a Unixware box.
> BM> LOCK_SH reported 'Bad file number'
>
> not sure why that error shows up.
I believe this error happens if flock is using lockf. I can see why it
happens when you ask for an exclusive lock on a read-only file but I'm
not really sure why requesting a shared lock on a write-only file should
cause it.
Regardless, a simple fix would be to open read-write (assuming Solaris
has the same problem as Unixware).
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: 09 Sep 1999 00:52:46 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Is My computer busted?
Message-Id: <x7u2p4n0td.fsf@home.sysarch.com>
>>>>> "RD" == Rick Delaney <rick.delaney@home.com> writes:
RD> I believe this error happens if flock is using lockf. I can see why it
RD> happens when you ask for an exclusive lock on a read-only file but I'm
RD> not really sure why requesting a shared lock on a write-only file should
RD> cause it.
RD> Regardless, a simple fix would be to open read-write (assuming Solaris
RD> has the same problem as Unixware).
this is from solaris: man flock.3b
A lock is applied by specifying an operation parameter
LOCK_SH for a shared lock or LOCK_EX for an exclusive lock.
The operation paramerer may be ORed with LOCK_NB to make the
operation non-blocking. To unlock an existing lock, the op-
eration should be LOCK_UN.
Read permission is required on a file to obtain a shared
lock, and write permission is required to obtain an exclu-
sive lock.
so the shared lock fails because the file has to be RW for both locks to
work.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 9 Sep 1999 06:09:33 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Is My computer busted?
Message-Id: <7r7iut$2h8$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Uri Guttman
<uri@sysarch.com>],
who wrote in article <x7wvu0nakp.fsf@home.sysarch.com>:
> >>>>> "BM" == Bill Moseley <moseley@best.com> writes:
>
>
> BM> Tom Christiansen (tchrist@mox.perl.com) seems to say...
> >> [courtesy cc of this posting mailed to cited author]
> >>
> >> perl -w -Mstrict -MFcntl=:flock -le 'print LOCK_NB'
>
> BM> 34) ~/public_html/lii/docs %perl -w -Mstrict -MFcntl=:flock -le 'print
> BM> LOCK_NB'
>
> tom, why the use strict? no vars are used in the -e code.
Probably to avoid deciphering
> perl -wle "print LOCK_NB"
Name "main::LOCK_NB" used only once: possible typo at -e line 1.
Filehandle main::LOCK_NB never opened at -e line 1.
Hmm, does not help:
> perl -Mstrict -wle "print LOCK_NB"
Name "main::LOCK_NB" used only once: possible typo at -e line 1.
Filehandle main::LOCK_NB never opened at -e line 1.
Do we need an additional stricture for this?
Ilya
------------------------------
Date: Wed, 8 Sep 1999 23:13:37 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Is My computer busted?
Message-Id: <MPG.1240eff1716dc440989728@nntp1.ba.best.com>
Uri Guttman (uri@sysarch.com) seems to say...
> >>>>> "RD" == Rick Delaney <rick.delaney@home.com> writes:
> RD> Regardless, a simple fix would be to open read-write (assuming Solaris
> RD> has the same problem as Unixware).
>
> this is from solaris: man flock.3b
> ...
> so the shared lock fails because the file has to be RW for both locks to
> work.
Thanks all for the help.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Wed, 08 Sep 1999 22:56:23 -0400
From: "Anthony Lalande" <tonyboy@earthling.net>
Subject: Newbie: Perl scripts and permissions
Message-Id: <7r77kq$e5g@tandem.CAM.ORG>
Greetings,
I have a Perl script which is supposed to run, extract information from
the mailbox file, and delete the file. The script manages to do
everything except delete the file. I am using the following command:
unlink "${working_dir}${filename}";
But the file is always there. I have tried appending...
|| print "Error: $!\n";
to the end of the line, but it doesn't generate any errors or failure
messages.
I think the problem is with the permissions. I get the feeling that my
script does not have access to delete the file, which makes me wonder,
what access does my script have? Is it exactly as if I were executing it
(ie: from my user account)?
Thanks for the help,
- Anthony L.
------------------------------
Date: Wed, 8 Sep 1999 23:51:47 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Newbie: Perl scripts and permissions
Message-Id: <MPG.1240f8d96ad90401989f38@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <7r77kq$e5g@tandem.CAM.ORG> on Wed, 08 Sep 1999 22:56:23 -
0400, Anthony Lalande <tonyboy@earthling.net> says...
> I have a Perl script which is supposed to run, extract information from
> the mailbox file, and delete the file. The script manages to do
> everything except delete the file. I am using the following command:
>
> unlink "${working_dir}${filename}";
>
> But the file is always there. I have tried appending...
>
> || print "Error: $!\n";
>
> to the end of the line, but it doesn't generate any errors or failure
> messages.
It will never generate an error message as you have written it. The
argument to unlink() is
"$working_dir$filename" || print ...
As the first expression is always TRUE, the 'print' will never get
executed.
Either replace the '||' by 'or' (my choice), or put parentheses around
the argument to unlink(). Run it again, and see what the error message
is.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 09 Sep 1999 00:33:48 -0400
From: "Ethan H. Poole" <ehpoole@ingress.com>
Subject: Re: perl error codes on NT
Message-Id: <37D738AC.AB271CA@ingress.com>
mgold@ida.bway.net wrote:
>
> Hi All
>
> I am getting this error code:
> I am running a perl script on IIS
>
> %1 is not a valid Windows NT application.
>
> Any help is appreciated.
>
> Thanks.
This is a web server configuration issue. You do not have a proper
mapping for the .pl or .cgi extension to perl.exe.
The correct version is: .pl -> c:\perl\bin\perl.exe "%s" "%s"
Note the lower case 'S'. Some upgrades have been known to change the
mapping to %S %S, which will not work. The quotes are optional but
necessary if there is ever a chance the script may be passed a filename or
parameter with a space character. You may also wish to invoke the -T
(taint checking parameter), which would become:
.pl -> c:\perl\bin\perl.exe -T "%s" "%s"
Note: Extension mapping for the web server is *not* the same as making an
association in Explorer. These mappings are made either by the web
server's configuration/management console or in the system registry
(depending on the web server and its release version).
--
Ethan H. Poole **** BUSINESS ****
ehpoole@ingress.com ==Interact2Day, Inc.==
(personal) http://www.interact2day.com/
------------------------------
Date: Thu, 09 Sep 1999 03:41:05 GMT
From: salo2000@my-deja.com
Subject: perl question
Message-Id: <7r7a8g$jol$1@nnrp1.deja.com>
I've just started studying perl from a book
I have a problem relating to different parts of a regular expression as
different expressions using the delimiter "_". for example
the expression in TTT file is : "x_y_z_t". I would like to compare each
part of this expression, to other expression's part from RRR file lets
say "g_h_z_t" so I would like to check if the first x (in TTT file) is
similar to the first g (in RRR file) and then if the second y is
similar to the second h
could anyone help me with that ?
thanks in advance
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 09 Sep 1999 00:15:11 -0400
From: "Ethan H. Poole" <ehpoole@ingress.com>
Subject: Re: perl.exes hanging around on NT
Message-Id: <37D7344F.28A7D426@ingress.com>
[posted and emailed\
balesn@my-deja.com wrote:
>
> We are running Netscape Enterprise Server 3.6.1 on NT 4.0 and
> ActivePerl from ActiveState, build 519. We continually have perl.exes
> hanging around. They do not appear to be taking up system resources,
> but if we let 100 or so accumulate the server comes to a halt.
>
> Right now I monitor Task Manager and then open a DOS session and
> manually kill the perl.exe processes - what a pain!
I'm not familiar with the NE Server but I have seen poorly written scripts
which attempt to read more bytes from STDIN than were specified in
CONTENT_LENGTH result in a hang since the server is not required to
provide an EOF if the user attempts to read beyond CONTENT_LENGTH.
Technically the server should *not* alter STDIN, but some do -- perhaps in
an effort to protect users from themselves (not sure what prompted some
servers to add EOF characters).
The result is scripts which will hang whenever data is submitted via the
POST method, or, rarer, the GET method if they're parser ignored the value
of REQUEST_METHOD.
You may have some users uploading such faulty scripts "because they worked
on XYZ server" or because they "came from XYZ's script archive" and, thus,
"must be working scripts."<eg> Of course, the script then hangs and the
user feels the need to try reloading/refreshing their browser a few dozen
times in the belief that if you try often enough it will spontaneously
correct itself.
You can test whether or not this is a likely culprit by writing your own
script which attempts to read more than CONTENT_LENGTH bytes from STDIN.
If it hangs then you know to be suspicious other scripts are trying to do
the same thing. The solution then would likely be to look through the
server logs to see which scripts do not appear to have returned any more
bytes than it takes to send a '500' status header to the client's
browser. Then, if you see a pattern between the times the scripts were
run and the number of hung processes, you can notify the 'webmasters' of
those sites to either correct the offending scripts or discontinue using
them.
Just one place worth looking into. Always possible there may be others.
--
Ethan H. Poole **** BUSINESS ****
ehpoole@ingress.com ==Interact2Day, Inc.==
(personal) http://www.interact2day.com/
------------------------------
Date: 06 Sep 1999 22:08:40 +0200
From: Gisle Aas <gisle@aas.no>
Subject: Re: Randal vandal aborts Schwartz
Message-Id: <m37lm3n6pj.fsf@eik.g.aas.no>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
> Neale> Imagine my dismay when I received the message:
> Neale> Can't locate object method "authority" via package "URI::mailto" at
> Neale> /perl/site/lib/URI/WithBase.pm line 41.
>
> In later versions of my link checkers (like the one at col35), I've
> added the mysterious:
>
> sub URI::mailto::authority { ""; } # workaround bug
>
> I've sent this bug to Gisle Aas, who has told me that he doesn't
> understand why I need the workaround. All I know is that when I
> define this subroutine, I don't get the errors that you report. :) I
> don't think he expected anyone to invoke:
>
> my $url = URI->new_abs("http://machine.com/foo/bar", "mailto:him\@x.org");
>
> though.
URI-1.03 (released 1999-06-24) had a fix for this.
--
Gisle Aas
------------------------------
Date: Thu, 09 Sep 1999 09:57:12 +0100
From: kev <kevin.porter@fast.no>
Subject: ref to array of ref to arrays
Message-Id: <37D77668.8C254AE9@fast.no>
Hi,
I need to know how to get hold of the values from the results returned
from the DBI method selectall_arrayref. The docs say it returns "a
reference to an array containing references to arrays for each row of
data fetched".
This is a little beyond me. How do I read, say, the second row? Or the
fourth column in the fifth row, etc?
Thanks,
- Kev
------------------------------
Date: Wed, 8 Sep 1999 11:04:57 -0600
From: "Clifford Lloyd" <cliff.lloyd@gov.ab.ca>
Subject: Running a perl program on Unix and Windows
Message-Id: <7r64tq$3om$1@is-news.gov.ab.ca>
I have written a perl program that runs on Unix and Windows. I have one
problem my program uses the Win32::API module. This module is only used when
the operating system is Windows. However I have to comment it out when
running the program on unix. Is there anyway that I can dynamically load
this module in when the operating system is Windows?
------------------------------
Date: Wed, 8 Sep 1999 20:32:47 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Running a perl program on Unix and Windows
Message-Id: <MPG.1240ca3990240af6989726@nntp1.ba.best.com>
Clifford Lloyd (cliff.lloyd@gov.ab.ca) seems to say...
> Is there anyway that I can dynamically load
> this module in when the operating system is Windows?
Wrap the use in a BEGIN block and use eval to trap any errors.
For example, I just used this:
BEGIN {
unless ( eval "use Stemmer" ) {
use Text::English;
}
}
You can check $^O to see what OS you are running under.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Thu, 9 Sep 1999 02:19:36 -0400
From: gyepi@magnetic.praxis-sw.com (Gyepi SAM)
Subject: Re: Running a perl program on Unix and Windows
Message-Id: <slrn7tekk4.j9a.gyepi@magnetic.praxis-sw.com>
On Wed, 8 Sep 1999 11:04:57 -0600, Clifford Lloyd <cliff.lloyd@gov.ab.ca> wrote:
>I have written a perl program that runs on Unix and Windows. I have one
>problem my program uses the Win32::API module. This module is only used when
>the operating system is Windows. However I have to comment it out when
>running the program on unix. Is there anyway that I can dynamically load
>this module in when the operating system is Windows?
use the $^O variable
perl -e 'print $^O' says 'linux' on Linux
perl -e "print $^O" says 'MSWin32' on NT
--
Gyepi Sam --+-- Designer/Programmer --+-- Network/System Administrator
gyepi@praxis-sw.com --+-- http://www.praxis-sw.com/gyepi
One Bell System - it sometimes works.
------------------------------
Date: 9 Sep 1999 07:15:21 GMT
From: "Bart Simpson" <phony@nospam.com>
Subject: Sorry, Re: Why, why, why, -w and use strict?
Message-Id: <7r7mqb$eil$0@216.39.133.13>
Kragen Sitaker <kragen@dnaco.net> wrote in message
news:BJDB3.12481$r5.818064@typ11.nn.bcandid.com...
<snip>
> Oh, by the way, if you post as 'phony@nospam.com', people will think
> you're a total lame loser.
>
My ISP recommended using a phony address when posting to newsgroups because
he says it cuts down on spam.
The only moderator that even mentioned anything about it said he didn't mind
the address because he could still track me down and complain to my ISP from
the info in the message header.
I dont mind being thought of as a lame loser if it slows down the spam some.
And since I read the newsgroups for the replies, my email address isn't
needed.
------------------------------
Date: 9 Sep 1999 07:11:54 GMT
From: "Bart Simpson" <phony@nospam.com>
Subject: Sorry, Re: Why, why, why, -w and use strict?
Message-Id: <7r7mjr$e4p$0@216.39.133.13>
Kragen Sitaker <kragen@dnaco.net> wrote in message
news:BJDB3.12481$r5.818064@typ11.nn.bcandid.com...
<snip>
> Oh, by the way, if you post as 'phony@nospam.com', people will think
> you're a total lame loser.
>
My ISP recommended using a phony address when posting to newsgroups because
he says it cuts down on spam.
The only moderator that even mentioned anything about it said he didn't mind
the address because he could still track me down and complain to my ISP from
the info in the message header.
I dont mind being thought of as a lame loser if it slows down the spam some.
And since I read the newsgroups for the replies, my email address isn't
needed.
------------------------------
Date: 9 Sep 1999 03:29:14 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Sorry, Re: Why, why, why, -w and use strict?
Message-Id: <slrn7tes41.nrl.abigail@alexandra.delanet.com>
Bart Simpson (phony@nospam.com) wrote on MMCC September MCMXCIII in
<URL:news:7r7mqb$eil$0@216.39.133.13>:
``
`` Kragen Sitaker <kragen@dnaco.net> wrote in message
`` news:BJDB3.12481$r5.818064@typ11.nn.bcandid.com...
`` <snip>
`` > Oh, by the way, if you post as 'phony@nospam.com', people will think
`` > you're a total lame loser.
`` >
``
`` My ISP recommended using a phony address when posting to newsgroups because
`` he says it cuts down on spam.
So, you let the spammers win? How much spam do you really get? Is it really
worth faking your address? Do you walk outside wearing a ski mask as well?
`` The only moderator that even mentioned anything about it said he didn't mind
`` the address because he could still track me down and complain to my ISP from
`` the info in the message header.
This group doesn't have a moderator.
`` I dont mind being thought of as a lame loser if it slows down the spam some.
`` And since I read the newsgroups for the replies, my email address isn't
`` needed.
Have fun reading then. I certainly won't answer your postings. In fact,
I'll just killfile you.
Address mungers are lusers.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 9 Sep 1999 14:32:01 +1000
From: "Andrew" <andrewl@fire.tas.gov.au>
Subject: use cgi/perl to hide access to subdirectory
Message-Id: <37d7384d@derwent.nt.tas.gov.au>
I want to have a html page that calls cgi and within the cgi, I simply want
to run another html page which is thereby hidden from the user. Can it be
done and how?
------------------------------
Date: Thu, 09 Sep 1999 08:51:09 GMT
From: ladlad@my-deja.com
Subject: WHAT IS THE BEST WAY
Message-Id: <7r7sdq$gu$1@nnrp1.deja.com>
Hi,
I need to find a text on a webpage that is on a remote server and
return the searching result to a user.
Can you recommend any good(best) way how to do it?
The page can be quite large.
Is it necessary to download the page first(via LWP)?
Thank you your help.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 9 Sep 1999 09:16:22 +0200
From: "Aldo Calpini" <dada@divinf.it>
Subject: Re: XS and tie
Message-Id: <7r7mqm$1k8$1@fe1.cs.interbusiness.it>
Aldo Calpini wrote:
> > does the perlguts API for hashes (in particular,
> > hv_store) support tied hashes and their magic?
>
> in reply to my own question, I just realized that
> I overlooked the paragraph 'Understanding the
> Magic of Tied Hashes and Arrays' in perlguts ;-)
still replying to myself (well, if I'm on the wrong
newsgroup, feel free to address me somewhere else :-).
the docs sentence about values that do not actually
need to be stored is still unclear to me, but at least
I've found a way around my problem. I had to change all
the hv_store() and hv_fetch() occurrencies in XS
to something like:
storing = newSViv((long) someValue);
hv_store(self, "-type", 5, storing, 0);
mg_set(storing);
val = hv_fetch(self, "-type", 5, 0);
if(SvMAGICAL(self)) mg_get(*val);
if(val != NULL && SvOK(*val)) {
type = SvIV(*val);
}
that's it. basically, I don't care about the result of
hv_store() (it seems to always return NULL), nor can I
successfully test the result of hv_fetch() for its
NULLness, because it seems to never return NULL, even
if the key does not exist in the hash. my guess about
this is that my FETCH method returns C<undef> (which
is not the same as NULL) if the key is not there, so
I had to add the SvOK() test.
this is somewhat annoying, and a real fetch would
require the use of hv_exists() too. but since the
docs say that there's the intention to provide a more
transparent access to both tied and normal data
types, I take it as it is...
if someone sees a brain damage in my code and has a
more fancy solution at hand, I'll be happy to hear ;-)
bye.
__END__
# Aldo Calpini
print sort {$_{$a} cmp $_{$b}} values %{{split undef,
"xritajbugne fahokem csuctawer jhdtlrnpqloevkshpr"}};
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 746
*************************************