[8604] in Perl-Users-Digest
Perl-Users Digest, Issue: 2221 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 1 01:09:02 1998
Date: Tue, 31 Mar 98 22:00:27 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 31 Mar 1998 Volume: 8 Number: 2221
Today's topics:
Re: bug? (Kirrily 'Skud' Robert)
Cgi Perl Programming problem expoinfo@globalexpos.co.nz
CGI-Calling a Perl script within a Perl script (James Watson)
Re: CGI-Calling a Perl script within a Perl script (Abigail)
Converting Perl <kennyj@postoffice.co.uk>
Dispatching other scripts/programs from within Perl scr <szwedyk@ibm.net>
Re: File::Find vs. File::Recurse (was Re: file trees) (Peter Scott)
Re: God Help Us All (was: Re: Sneex having problems) <sneaker@mediaone.net>
Re: God Help Us All (was: Re: Sneex having problems) <sneaker@mediaone.net>
Re: God Help Us All (was: Re: Sneex having problems) <sneaker@mediaone.net>
Re: help needed with grep type function for perl script <rootbeer@teleport.com>
How should I send a signal 'INT' to a remote server? <James_Yang@via.com.tw>
Re: How to read from keyboard without enter? (Peter Caffin)
Re: Is there a "Newsgroup" for Newbies to Perl? (Jim Michael)
Re: Is there a "Newsgroup" for Newbies to Perl? <rootbeer@teleport.com>
Re: Is there a "Newsgroup" for Newbies to Perl? <roy1089@ids.net>
Munging addresses (was: Re: Perl Cgi Questions) <rootbeer@teleport.com>
Re: Odd or even function <eugene@vertical.net>
Re: Odd or even function <eugene@vertical.net>
Overriding compile time builtins? (namely, "use") <zenin@archive.rhps.org>
Re: problematic pattern matching (Tad McClellan)
Re: problematic pattern matching <ajohnson@gpu.srv.ualberta.ca>
Re: PROPOSAL: The Perl Dictionary (David Adler)
Re: Question on one of Abigail's obfuscated sigs <rootbeer@teleport.com>
Re: readdir/grep/map <doug@tc.net>
Re: readdir/grep/map <rootbeer@teleport.com>
Record size of DBM Hashes <csperl@madison.tds.net>
Re: see cookie problem... <rootbeer@teleport.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 1 Apr 1998 03:03:51 GMT
From: krobert@skud.cc.monash.edu.au (Kirrily 'Skud' Robert)
Subject: Re: bug?
Message-Id: <slrn6i3bl3.e5.krobert@skud.cc.monash.edu.au>
In article <35178C44.167E@cadre.sjsu.edu>, Nico Dufort wrote:
>
>#!/usr/bin/perl -w
>
>open (IN,"test2.html") || die "cannot open test2.html: $!";
> while (<IN>) {
Here, you're looping through the input file, repeating the block below for
every line. If you test2.html has 19 lines, you'll get the output 19 times.
> $var = "var = X;";
> substr($var, 6, 1) = "9";
This is confused; You are really just saying $var = "var = 9" here, and I have
no idea why you might be doing that.
> print "$var\n";
19 prints, one for each line in test2.html
>close (IN) || die "can't close number.dat: $!";
You look as if you're confused by what file you're opening here. Surely you
mean "can't close test2.html" here, if anything.
>so, when i run it from the shell, it prints the output 19 times.
>anybody who could tell me what's wrong? or maybe the computer doesn't
>like me (that could be a possibility, it might be tired of me working
>until 500am every night. hehehe)
My guess is that what you're *trying* to do is change one line which looks
like this:
var = X
into one that looks like this:
var = 9
yesno?
If so, what you want to do is this:
while (<>) {
s/var = X/var = 9/;
print;
}
K.
--
Kirrily "Skud" Robert (skud@monash.edu.au)
http://w3.cc.monash.edu.au/~krobert/
Computare Ergo Sum
------------------------------
Date: Tue, 31 Mar 1998 23:42:11 -0600
From: expoinfo@globalexpos.co.nz
Subject: Cgi Perl Programming problem
Message-Id: <6fsjti$5ml$1@nnrp1.dejanews.com>
Could anyone with a knowledge in perl please help me with a problem in cgi?
Thanks
Andrew Broadley
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Tue, 31 Mar 1998 22:38:35 GMT
From: james_vs_watson@yahoo.com (James Watson)
Subject: CGI-Calling a Perl script within a Perl script
Message-Id: <35226f91.39770123@news.erols.com>
I have posted a similar message on comp.infosystems.www.authoring.cgi,
but have not gotten a reply yet and I was hoping someone here might be
able to help me.
I have a Perl script that is inputted a filename that can be
downloaded from the Internet. I then call another Perl script to
download this file and save it on the local hard drive. My other Perl
script should then continue and change the file.
But when I call the other Perl script, nothing changes, yet I can use
this second Perl script by calling it from the shell. Is there an
aspect about Perl that I am missing.
Any help would be most appreciated.
Thanks
- James Watson
------------------------------
Date: 1 Apr 1998 04:37:54 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: CGI-Calling a Perl script within a Perl script
Message-Id: <6fsgb2$knh$3@client3.news.psi.net>
James Watson (james_vs_watson@yahoo.com) wrote on MDCLXXIII September
MCMXCIII in <URL: news:35226f91.39770123@news.erols.com>:
++ I have posted a similar message on comp.infosystems.www.authoring.cgi,
++ but have not gotten a reply yet and I was hoping someone here might be
++ able to help me.
++ I have a Perl script that is inputted a filename that can be
++ downloaded from the Internet. I then call another Perl script to
++ download this file and save it on the local hard drive. My other Perl
++ script should then continue and change the file.
++ But when I call the other Perl script, nothing changes, yet I can use
++ this second Perl script by calling it from the shell. Is there an
++ aspect about Perl that I am missing.
Probably.
Maybe you spend some time finding out what goes wrong (you're checking
return values of functions, aren't you?) and when you have localized
the problem ask a clear question.
Of course, it might be just another CGI problem. In that case, you
know where to find the CGI groups.
Abigail
--
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
print+Just (), another (), Perl (), Hacker ();'
------------------------------
Date: 31 Mar 1998 09:36:03 GMT
From: "James Kenny" <kennyj@postoffice.co.uk>
Subject: Converting Perl
Message-Id: <01bd5c88$17f21290$bf015790@itbl19233>
I have a numberof Perl Scripts running on a UNIX box.
I need to convert the Perl so it will run on NT Server.
Are there any insumountable problems I am likely to come up against.
I know a lot will depend on the application but is there any show stoppers
when converting from UNIX to NT.
I also no nothing about Perl yet but I have a feeling that will change!
James Kenny
------------------------------
Date: Tue, 31 Mar 1998 23:58:45 -0500
From: Peter Szwedyk <szwedyk@ibm.net>
Subject: Dispatching other scripts/programs from within Perl script
Message-Id: <3521C985.9FB2C14D@ibm.net>
I'm writing a Perl program which will be dispatching a set of other
programs (csh, perl, java, etc.) in sequence.
I need to capture return codes for programs dispatched into forground.
As for programs that would be sent into background, I need to be sure
that the program being dispatched into background was dispatched
successfullly - that is , it started executing.
Example:
$rc = system("load_data.pl");
*** NO PROBLEM HERE
$rc = system("load_data.pl &");
$rc = system("rsh -l userid somehost load_data.pl");
$rc = system("rsh -l userid somehost load_data.pl &" );
*** In the above three cases $rc is always 0 - I atleast need to know
that load_data.pl was invoked successfully
I thing that the system function is not appropriate in these cases.
Could anyone help?
Thanks.
------------------------------
Date: 31 Mar 1998 18:06:26 GMT
From: psf@euclid.jpl.nasa.gov (Peter Scott)
Subject: Re: File::Find vs. File::Recurse (was Re: file trees)
Message-Id: <6frbb2$rul@netline.jpl.nasa.gov>
> Does anyone care to pontificate on why you'd choose one of File::Find
> and File::Recurse over the other?
Okay. File::Recurse allows you to send a parameter to the callback (in lieu
of supplying multiple root points). P.681 of the Perl Module Reference:
"There is an optional third parameter which [...] is passed as the second
parameter to the user-defined function. This can be useful for building
library routines [...] so that they do not have to pass state to the function
as global variables."
I switched from File::Find to File::Recurse (yesterday!) for precisely
this reason. However, I found what appears to be a bug and sent it to
the author:
33 return undef if (!-d $dir);
34 croak("Recursion ran too deep on $dir")
35 if $level > $File::Recurse::MAX_DEPTH;
36 opendir(D,$dir) || return horf($dir);
37 while(defined($file = readdir D)) {
38 next if ($file eq '.' || $file eq '..');
39 my $path = "$dir/$file";
40 next unless -e $path;
41
42 $_ = $path;
43 $ret = &$exe($path,$context);
44 next if ($ret == -1);
45 last if ($ret == -2);
46
47 if (-d _) {
48 next if (-l $path && !$File::Recurse::FOLLOW_SYMLINKS);
49 $ret = recurse($exe,$path,$context,$level+1);
I was getting warnings that $ret was undefined, but that can only happen
due to line 33, and how could it have reached that when the starting point
was a directory? Well, if the callback in line 43 does a stat()
on another file (as mine did, with -f) that happens to be a directory,
line 47 is looking at the results from the wrong stat. (_ is global per Camel
p.140.)
I changed line 47 to:
47 if (-d $_) {
and it appears to work fine.
--
This is news. This is your | Peter Scott, NASA/JPL/Caltech
brain on news. Any questions? | (psf@euclid.jpl.nasa.gov)
Disclaimer: These comments are the personal opinions of the author, and
have not been adopted, authorized, ratified, or approved by JPL.
------------------------------
Date: Wed, 01 Apr 1998 03:18:49 GMT
From: Sneaker's Nest <sneaker@mediaone.net>
Subject: Re: God Help Us All (was: Re: Sneex having problems)
Message-Id: <3521B0A9.5546@mediaone.net>
John Porter wrote:
>
> And some people wonder "what's so bad about being a newbie".
>
What's so bad about being a newbie is
one day I can look forward to being
an old fart.
A hateful one...
------------------------------
Date: Wed, 01 Apr 1998 03:20:12 GMT
From: Sneaker's Nest <sneaker@mediaone.net>
Subject: Re: God Help Us All (was: Re: Sneex having problems)
Message-Id: <3521B0FD.4FF6@mediaone.net>
Andre L. wrote:
>
> Please take this to alt.personal.vendettas.
>
> Live && let live.
>
> A.L.
>
> ========================
>
I agree and I apologize
to the group. As far as
I am concerned it's over
with.
------------------------------
Date: Wed, 01 Apr 1998 03:25:04 GMT
From: Sneaker's Nest <sneaker@mediaone.net>
Subject: Re: God Help Us All (was: Re: Sneex having problems)
Message-Id: <3521B221.5111@mediaone.net>
Stop defending me Mark.
Some of what he says is true.
I am guilty of being a newbie.
The only difference I see
between John Porter and the
other posters is that the
others have some civility.
In a private letter someone
once told me to live with it.
Well, they should practice
what they preach.
Live with it.
------------------------------
Date: Tue, 31 Mar 1998 21:48:52 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: just another $wanna{$be} perl hacker <root@127.0.0.1>
Subject: Re: help needed with grep type function for perl script.
Message-Id: <Pine.GSO.3.96.980331214835.28789G-100000@user1.teleport.com>
On Tue, 31 Mar 1998, just another $wanna{$be} perl hacker wrote:
> I cannot find the meanings for the \Q and \E in the blue camel book.
> hint please.
Look for 'quotemeta'. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 01 Apr 1998 11:08:58 +0800
From: James Yang <James_Yang@via.com.tw>
Subject: How should I send a signal 'INT' to a remote server?
Message-Id: <3521AFCA.8AE3AE33@via.com.tw>
Hi,
If I execute a Perl script on server severA and then it do the this
exec("rsh $host 'cd $pwd;$prog @ARGV'");
How should I to send a interrupt signal to this process?
May I specify the server name in function 'kill'?
Thanks,
James
------------------------------
Date: Mon, 30 Mar 1998 19:15:11 GMT
From: UCE-trap_synic@omen.net.au (Peter Caffin)
Subject: Re: How to read from keyboard without enter?
Message-Id: <351fdedf.2872680@news.omen.net.au>
"Mikko Hdmdldinen" <mikolas@works.fi> did cunningly address to
comp.lang.perl.misc..
:Tony Christian Svderudd wrote in message <6fq1fq$csn$1@verkko.uwasa.fi>...
:>So how do I read a character from keyboard without pressing the enter?
:>print "something (y/n)? ";
:>chop($valinta = <STDIN>");
:>..
:>tony -- e75727@uwasa.fi
:Refer the FAQ.
Rather than such a wet-blanket response like this, you could have responded
with something like:
"I'm not sure.
"
"Check the PERL FAQ at http://language.perl.com/faq/index.html
The Camel Book really ought to carry an update on the atmosphere of this
newsgroup now that it's become all snooty and information-lazy *sigh*.
--: _ ___ _ _ _
_oo__ |_|_ |__ _ | | _ |_|_' _ synic at omen dot net dot a u
//`'\_ | (/_|(/_| .|. |_(_|| | || | http://www.omen.net.au/~synic
/ PO Box 869, Hillarys WA 6923, AUSTRALIA
------------------------------
Date: Wed, 1 Apr 1998 03:05:16 GMT
From: genepool@netcom.com (Jim Michael)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <genepoolEqpsKs.H8D@netcom.com>
Chris Vogel (C.VOGEL@LINK-GOE.de) wrote:
: For these people it would be nice to have a place to go to - as I
: wrote before - maybe some kind of virtual university to share their
: experiences.
I think the virtual professors are going to resent the fact that the
virtual students aren't reading their virtual books and doing their
virtual homework. This seems very familiar for some reason.
Virtually,
J.
------------------------------
Date: Tue, 31 Mar 1998 20:27:42 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Howard Davies <Howard@roslyn.demon.co.uk>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <Pine.GSO.3.96.980331202715.13245H-100000@user1.teleport.com>
On Tue, 31 Mar 1998, Howard Davies wrote:
> Has anyone thought of setting up a "comp.lang.perl.help" newsgroup?
If this newsgroup doesn't work for you, why would one with that name
succeed? :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 01 Apr 1998 00:30:07 -0500
From: Jeffrey <roy1089@ids.net>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <3521D0DE.87116E89@ids.net>
All this is ignorace. I don't give a fat ass who wants to help. Free
help is good help. If the person is qualified or not. Sometimes an
unqualified person has good things to teach to.
Mark Stackhouse wrote:
> Thanks for posting Bob! You have professionally expressed
> the thoughts of many beginners who TRY to hang out here! I,
> for one, would rather not remain "mute" throughout my
> journey of learning Perl. Thanks for the encouragement! I
> can't learn effectively without asking questions.
>
> To those interested, Sneex is asking for our input on a
> Newbie chat group and an AutoFAQ. See: Announcement (Re:
> was (Calling all Newbies)).
> Sneex is knowledgeable AND a class A-1 guy (see his posts
> here). He is also a system admin so whatever is done will
> be done professionally :-)
> If you're really interested in learning Perl without being
> brain bashed,
> please give him your support.
>
> Bob Gwynne wrote:
> >
> > I thought that programmers were suppose to be logical thinkers. If
> > non-programmers should not "use" any programming language, how can
> they
> > learn a programming language without using one? Why did you
> co-author
> > Learning Perl--just for the money? For leisure reading by those who
> already
> > know how to program in Perl? Or did you write it to teach people how
> to use
> > the language. The arrogance of some of the "professional"
> programmers in
> > this newsgroup is appalling. And, your answer is the most appalling.
>
> > Whereas you should be encouraging people to learn Perl (at the very
> least so
> > that they buy your books), your answer is designed to drive them
> away. If
> > learning Perl is guaranteed to make me into an elitist maybe I
> should mail
> > you the books you wrote and have you mail me my money back--before I
> sell my
> > soul to the devil.
> >
> > Get off it! Try to help people who want to learn to program. You
> are
> > obviously not a professional teacher; therefore, you should not
> attempt to
> > teach by writing, by advising newbies, or by conducting workshops
> and
> > classes. Stick to programming if you are a programmer.
>
> TOUCHI, counter this, if you think you can, Tom!
> Programmers should program. Leave the teaching to
> professionals.
>
> >
> > Bob Gwynne
> >
> > Tom Christiansen wrote in message <6f5fm2$lr4>
> > >Nonprogammers should not use any programming language. Period.
> > >Nonsurgeons should perform any surgical interventions. Period.
> >
> > What??? You don't mean that!!
> >
> > This is
> > >a profession, you know. If you aren't a programmer, hire one.
> >
> > Sure, on a professor's salary yet!
>
> or a technician's :-)
>
> >
> > >
> > >"C/Java/C++/Perl for Non-programmers" is oxymoronic.
> > >
> > >--tom
> > >--
> > > Tom Christiansen tchrist@jhereg.perl.com
> > >
> > > "I think the pod should be the master...."
> > > --Larry Wall in <9410072305.AA03994@scalpel.netlabs.com>
>
> --
> Mark Stackhouse
>
> ***************
> *******************************************************
>
> homepage: http://www.execpc.com/~stackhou
>
> "The best things in life aren't things."
> --Art Buchwald
>
> **************
> ********************************************************
------------------------------
Date: Tue, 31 Mar 1998 20:57:48 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Karl Dyson <karld@feklore.demon.co.uk>
Subject: Munging addresses (was: Re: Perl Cgi Questions)
Message-Id: <Pine.GSO.3.96.980331205625.28789B-100000@user1.teleport.com>
On Tue, 31 Mar 1998, Karl Dyson wrote:
> I don't want to disgress too much but changing the reply-to addresses
> etc. etc. *will* stop many spam spiders. Many pieces of software for
> grabbing email addresses from newsgroups only read the header not the
> whole message.
Really? I've never seen one that does that. Have you? Did you write it
yourself? :-)
> However, instead of putting the full correct email address in your sig
> why not do something like this:
>
> Change your reply-to etc. etc. to
> you@no-spam.com
>
> but then in your signature file say
> "For my real email address change the word no-spam to your_domain."
Why not do that? Because most folks won't bother to un-munge; I know I
won't. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 31 Mar 1998 23:05:35 -0500
From: Eugene Sotirescu <eugene@vertical.net>
To: Dan Serban <judas@interprice.com>
Subject: Re: Odd or even function
Message-Id: <3521BD0C.4E3B9489@vertical.net>
The run-of-the-mill way:
$nu = <STDIN>;
$nu % 2 != 0 ? print "ODD\n" : print "EVEN\n";
The off-the-wall way (no pun intended):
$nu = <STDIN>;
$nu & 1 == 1 ? print "ODD\n" : print "EVEN\n";
Dan Serban wrote:
> Is there an odd or even perl function that could be used as a boolean
> operator? ie
>
> if odd(variable)
> {
> }
>
> etc...
>
> meaning that when the variable is operated on the if statement is only true
> (executable) when the number whithin the variable at the time is odd...
>
> same for the even part of it.
>
> Thanks
> Dan Serban
> judas@interprice.com
> http://www.interprice.com
------------------------------
Date: Tue, 31 Mar 1998 23:09:41 -0500
From: Eugene Sotirescu <eugene@vertical.net>
To: Dan Serban <judas@interprice.com>
Subject: Re: Odd or even function
Message-Id: <3521BE02.9A4457E2@vertical.net>
The run-of-the-mill way:
$nu = <STDIN>;
$nu % 2 != 0 ? print "ODD\n" : print "EVEN\n";
The off-the-wall way (no pun intended):
$nu = <STDIN>;
$nu & 1 == 1 ? print "ODD\n" : print "EVEN\n";
Dan Serban wrote:
> Is there an odd or even perl function that could be used as a boolean
> operator? ie
>
> if odd(variable)
> {
> }
>
> etc...
>
> meaning that when the variable is operated on the if statement is only true
> (executable) when the number whithin the variable at the time is odd...
>
> same for the even part of it.
>
> Thanks
> Dan Serban
> judas@interprice.com
> http://www.interprice.com
------------------------------
Date: 1 Apr 1998 03:49:16 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Overriding compile time builtins? (namely, "use")
Message-Id: <891402967.890169@thrush.omix.com>
Is there anyway to override compile time builtins, namely "use"?
Method to my madness:
I'd like to extend use to be able to search compressed file
archives for modules and maybe even be able to use URLs
as well to locate them, ala Java's "jar" files and such. I
thought about creating a "loadmod" function, however this
would meen that I'd have to change every use statement in
every module including the core modules. So much for
reusability. :-/
--
-Zenin
zenin@archive.rhps.org
------------------------------
Date: Tue, 31 Mar 1998 21:06:09 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: problematic pattern matching
Message-Id: <1vasf6.hsa.ln@localhost>
umesh@intertrust.com wrote:
: How can I match a pattern of two characters where the second is a function of
: the first?
: E.g., how to match all patterns of the type "ab", "bc", "cd", "de", ... ?
------------------------
#!/usr/bin/perl -w
$_ = 'abbcfoodefg';
@letters = split //;
for ($i=0; $i<@letters-1; $i++) {
if ( ord($letters[$i])+1 == ord($letters[$i+1])) {
print "matched '$letters[$i]$letters[$i+1]'\n"
}
}
------------------------
: I do not read this newsgroup regularly. Therefore, please send me email at
: umesh@intertrust.com.
Uh oh.
The Usenet "suicide sin" (the sin for which there is no forgiveness).
Into the killfile you go.
Good luck.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 31 Mar 1998 23:36:42 -0600
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: problematic pattern matching
Message-Id: <3521D26A.47404064@gpu.srv.ualberta.ca>
umesh@intertrust.com wrote:
!
! How can I match a pattern of two characters where the second is a
! function of the first?
!
! E.g., how to match all patterns of the type "ab", "bc", "cd",
! "de", ... ?
well, one possibility might be:
++${\($a=$2)}eq$3?print"matched $1\n":--pos while/((.)(.))/g;
however, for better, more general solutions you would have to
! I do not read this newsgroup regularly. Therefore, please send me
! email at umesh@intertrust.com.
oh...nevermind.
regards
andrew
--
"They're not soaking...they're rusting"
--my wife, on my dishwashing habits.
------------------------------
Date: 1 Apr 1998 05:20:30 GMT
From: dha@panix.com (David Adler)
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <6fsiqu$9k2@news1.panix.com>
Yes, I know I'm behind...
On 27 Mar 1998 08:23:04 -0700, Randal Schwartz <merlyn@stonehenge.com> wrote:
>>>>>> "David" == David Adler <dha@panix.com> writes:
>
>David> On Wed, 25 Mar 1998 06:06:01 -0500, brian d foy <comdog@computerdog.com> wrote:
>>> In article <6fai4r$prm$1@nnrp1.dejanews.com>, brian_r_parkes@hotmail.com posted:
>>>
>>> perlilous - mucking with the internals or trying to understand Chip.
>
>David> ... or trying to outdrink Randal.
>
>Are you counting the full glasses or broken glasses?
>
>:-)
Full. I can't even dream of competing on the broken ones. :-)
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"The perversity of the Universe tends towards a maximum."
------------------------------
Date: Tue, 31 Mar 1998 20:34:38 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Just Another $wanna{$be} Perl Hacker <root@127.0.0.1>
Subject: Re: Question on one of Abigail's obfuscated sigs
Message-Id: <Pine.GSO.3.96.980331203247.13245J-100000@user1.teleport.com>
On Tue, 31 Mar 1998, Just Another $wanna{$be} Perl Hacker wrote:
> s/(..)z?/qq'print chr 0x$1 and \161 ss'/ee;
> I do not understand the quoting in the last line.
The qq'' is a double-quoted string (with alternate syntax).
> I realize the right side is evaluated twice as an EXPR, but am
> confused as to what exactly is occurring.
The first /e evaluates that expression to see what results. The second
evaluates _that_ to see what results.
Does that make it any clearer? Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 31 Mar 1998 22:27:18 -0500
From: Douglas McNaught <doug@tc.net>
To: Peter Sakalaukus <sakalauk@coam.usm.edu>
Subject: Re: readdir/grep/map
Message-Id: <m2lntqfch5.fsf@ono.tc.net>
Peter Sakalaukus <sakalauk@coam.usm.edu> writes:
> Using the readdir examples in the "Camel Book", I've tried to
> read in the contents of a directory (skipping . .. and the file
> region.area) and then map the pwd directory onto each array element.
OK...
> I can only seem to either skip the unwanted files OR map the pwd
> but not both. I'm sure it can be done, but I'll be darned if I
> know.
>
> Insight anyone? Please. :)
We're not mindreaders. Post code and tell us what doesn't work.
-Doug
--
sub g{my$i=index$t,$_[0];($i%5,int$i/5)}sub h{substr$t,5*$_[1]+$_[0],1}sub n{(
$_[0]+4)%5}$t='encryptabdfghjklmoqsuvwxz';$c='fxmdwbcmagnyubnyquohyhny';while(
$c=~s/(.)(.)//){($w,$x)=g$1;($y,$z)=g$2;$w==$y&&($p.=h($w,n$x).h($y,n$z))or$x==
$z&&($p.=h(n$w,$x).h(n$y,$z))or($p.=h($y,$x).h($w,$z))}$p=~y/x/ /;print$p,"\n";
------------------------------
Date: Tue, 31 Mar 1998 20:55:24 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Peter Sakalaukus <sakalauk@coam.usm.edu>
Subject: Re: readdir/grep/map
Message-Id: <Pine.GSO.3.96.980331205436.28789A-100000@user1.teleport.com>
On Tue, 31 Mar 1998, Peter Sakalaukus wrote:
> Using the readdir examples in the "Camel Book", I've tried to
> read in the contents of a directory (skipping . .. and the file
> region.area) and then map the pwd directory onto each array element.
>
> I can only seem to either skip the unwanted files OR map the pwd
> but not both. I'm sure it can be done, but I'll be darned if I
> know.
Well, what have you tried so far? If we can see what you're trying, we can
tell you why it's not working. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 31 Mar 1998 22:55:58 -0800
From: Chaviv & Shaily <csperl@madison.tds.net>
Subject: Record size of DBM Hashes
Message-Id: <3521E4FE.7A06698A@madison.tds.net>
I am using a DBM Hash. Seems like when the key and data size of a single
entry is larger than 1024 Bytes - I get an error when trying to close
the DB files with dbmclose.
How can I enlarge the block size to accept larger records. Is there
another DBM library that solve this problem?
Thanks,
Haviv.
------------------------------
Date: Tue, 31 Mar 1998 20:31:02 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Jan Camp <camp@IAEhv.nl>
Subject: Re: see cookie problem...
Message-Id: <Pine.GSO.3.96.980331203037.13245I-100000@user1.teleport.com>
On Tue, 31 Mar 1998, Jan Camp wrote:
> If I upload (In ascii) this, the browser don't recognize it, do I have
> to chmod ?
When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.
http://www.perl.com/CPAN/
http://www.perl.org/CPAN/
http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
http://www.perl.org/CPAN/doc/manual/html/pod/
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". 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". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 2221
**************************************