[16235] in Perl-Users-Digest
Perl-Users Digest, Issue: 3647 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 13 03:05:27 2000
Date: Thu, 13 Jul 2000 00:05:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963471915-v9-i3647@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 13 Jul 2000 Volume: 9 Number: 3647
Today's topics:
As The Perl Turns [Was Re: ATTENTION PERL MACHOES!!!!!! <elaine@chaos.wustl.edu>
Re: As The Perl Turns [Was Re: ATTENTION PERL MACHOES!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <gellyfish@gellyfish.com>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <gellyfish@gellyfish.com>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <nospam@nospam.com>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <nospam@nospam.com>
Re: Bottleneck? Array or writing - neither? (Keith Calvert Ivey)
Re: Bottleneck? Array or writing - neither? <esmithNOesSPAM@exeter.com.invalid>
Re: Bottleneck? Array or writing - neither? <nnickee@nnickee.com>
Check Processes In An Unix Environment <christoph.schmutz@fw.oebb.at>
Re: command line input (jason)
Re: command line input (Bernard El-Hagin)
Re: Convert "\xAB\xCD" into number 43981 (Daniel S. Lewart)
Re: Convert "\xAB\xCD" into number 43981 <bart.lateur@skynet.be>
Re: Crypt() authentication not working for me... <egberts@mac.com>
Does file locking in perl on rh6.2 linux just not work? <fwslsm@cnsp.com>
Re: executing system commands via cgi? <gellyfish@gellyfish.com>
Help!. Installed 5.6, now Crypt::xxx modules are broke <robert@chalmers.com.au>
Re: Help!. Installed 5.6, now Crypt::xxx modules are b <robert@chalmers.com.au>
Re: How can I use HTML::Parser to get images from HTML <gellyfish@gellyfish.com>
Re: how to capture the message return from the system() (Tad McClellan)
Re: HOW TO FTP A FILE IN PERL SCRIPT <taboo@doofa.net>
Re: HOW TO FTP A FILE IN PERL SCRIPT (jason)
Re: New to perl, need help <nospam@nospam.com>
Newbie question on die and the diamond operator <o1technospam@skyenet.nospam.net>
Re: Newbie question on die and the diamond operator (NP)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 13 Jul 2000 04:22:08 GMT
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: As The Perl Turns [Was Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!]
Message-Id: <396D43F0.B9568961@chaos.wustl.edu>
p3rlc0dr@my-deja.com wrote:
>
> Namaste, YOUNG LEE! I have been watch CNN to help talk English.
Please to not be talking like CNN.
Geez, what a bit of theatre yet again....same people, same behaviour.
Maybe Pavlov should have studied geekboys to see at what point
approaching death enlightenment occurs. I'm beginning to suspect that he
would have observed death far more often than behavioural change.
It's almost like a soap opera where we'll tune in tomorrow to see which
stupid jerkoff has decided to use the same trite snide remarks to get an
ego rush. It's bordering on the pathetic.
Will you guys ever learn? Give it a rest.
e.
------------------------------
Date: Thu, 13 Jul 2000 05:10:28 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: As The Perl Turns [Was Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!]
Message-Id: <8kjivs$njs$1@nnrp1.deja.com>
In article <396D43F0.B9568961@chaos.wustl.edu>,
elaine@chaos.wustl.edu wrote:
> p3rlc0dr@my-deja.com wrote:
> >
> > Namaste, YOUNG LEE! I have been watch CNN to help talk English.
>
> Please to not be talking like CNN.
Be NICE TO ME I AM WOMAN TOO. ITS BEEN A BAD DAY FOR ME EVERYONE IS
BEING MEAN I WENT TO DENTIST AND HAVE FAKE TEETH.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 12 Jul 2000 22:30:50 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kio2a$8uf$1@orpheus.gellyfish.com>
On Wed, 12 Jul 2000 13:47:18 GMT p3rlc0dr@my-deja.com wrote:
> In article <smo7qdbind659@corp.supernews.com>,
> cberry@cinenet.net (Craig Berry) wrote:
>>
>> We like to keep this Perl cocktail party pleasant. Causing a scene to
>> drive away those who are problematic is better than allowing them to
>> become a continuing irritation.
>
> Craig your nice. Are you telling that being mean is okay if it keeps
> comp.lang.perl.misc happy?
>
That is what he is saying. This is 'crowd control' - you are just one of
a large number of randon anonymous new posters to this group. You have
started out by shouting at people and calling names. People would
rather you would go away so we can get on with answering questions from
people who are not being like this.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: 12 Jul 2000 22:34:11 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kio8j$9j0$1@orpheus.gellyfish.com>
On Wed, 12 Jul 2000 14:29:25 GMT p3rlc0dr@my-deja.com wrote:
> In article <396C435E.5A999DAC@bar.va>,
> mnatoni@rumbanet.it wrote:
>>
>> UseNet is free: Ideas you can get here and in other newsgroups are
>> (use)net earnings, if no one gives an answer to your questions, you
> have
>> lost nothing other but few seconds of your time.
>
> I never asked anything from comp.lang.perl.misc except for you to stop
> being MEAN.
>
Aw diddums, I can think of a lot more deserving groups for your attentions
than this one.
Anyhow its irrelevant as to whether you ever really do ask a question as
most of the wise readers will already have scored you down so low for
your pathetic outburst that they will never get to read it anyhow.
*plonk*
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: 13 Jul 2000 06:27:39 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kjngr$ivj$1@216.155.33.87>
In article <8kidrd$u5v$1@nnrp1.deja.com>, p3rlc0dr@my-deja.com wrote:
| In article <963415501.7966@itz.pp.sci.fi>,
| Ilmari Karonen <usenet11150@itz.pp.sci.fi> wrote:
| >
| > Well, that's hardly unreasonable. Let us all grant him this small
| favor.
| >
|
| I AM A WOMAN. BE NICE.
quit shouting, you're giving me a headache. :P
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: 13 Jul 2000 06:28:37 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kjnil$ivj$2@216.155.33.87>
In article <8kidto$u6h$1@nnrp1.deja.com>, p3rlc0dr@my-deja.com wrote:
| In article <396C9913.12E6C583@bar.va>,
| mnatoni@rumbanet.it wrote:
| >
| > Unfortunately, your request is off-topic in this newsgroup... :)
|
| NO ITS NOT. I BEEN NICE TO NOW ANSWER ME!!!!!!!!!!!!!!!!!
All you do is shout at us lately. :P
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Thu, 13 Jul 2000 04:06:08 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Bottleneck? Array or writing - neither?
Message-Id: <396d3ed5.15151368@nntp.idsonline.com>
Nnickee <nnickee@nnickee.com> wrote:
>I had something similar to this happen to me a while back... what
>prompted the "Uh oh" was realizing quite a few months after the fact
>that the reason my script was taking sooooo long to write to the file
>was because the script had flipped out [read: "I did something really
>stupid"] and the resulting file which should have been around 200k
>when finished... was <gulp> 1.2 gigs.
Let me guess: The program was processing a directory full of
files, but it was also writing a log file to that same
directory. My most recent similar experience was running HTML
Tidy on a directory and accidentally typing *.* instead of
*.htm, while logging errors to a file in the same directory. It
took me a minute to notice that the reason the processing wasn't
finishing is that the error log was getting rather large,
listing errors resulting from attempting to interpret the error
log as an HTML file.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
------------------------------
Date: Wed, 12 Jul 2000 21:15:09 -0700
From: Eric <esmithNOesSPAM@exeter.com.invalid>
Subject: Re: Bottleneck? Array or writing - neither?
Message-Id: <0ec2f223.5e286a9b@usw-ex0102-016.remarq.com>
Thanks, will do. I'm fairly confident that it will eventually
for two reasons - I've tested it on smaller starting texts and
they've been fine, and also I modified it (so it didn't do the
counting or scoring) and had it run on a really fast server once
night when it wasn't too busy and it eventually got through it
and output a huge 10meg file, but still completed.
This onc was great though, a small (relatively) file and fast -
I'm so happy!
Thanks all!
-Eric
Nnickee <nnickee@nnickee.com> wrote:
>Uh oh...
>
>>>>#output to file
>>>>open (TETRAGRAPHS, ">>$tetragraphs") or die "cannot open
>>TETRAGRAPHS: $!";
>>>>print TETRAGRAPHS "$testWord:$count:$score
>>>>\n";#ouputs WORD:COUNT:SCORE
>>>>close TETRAGRAPHS or die "cannot close
>>>>TETRAGRAPHS: $!";
>
>I had something similar to this happen to me a while back...
what
>prompted the "Uh oh" was realizing quite a few months after the
fact
>that the reason my script was taking sooooo long to write to
the file
>was because the script had flipped out [read: "I did something
really
>stupid"] and the resulting file which should have been around
200k
>when finished... was <gulp> 1.2 gigs.
>
>You might want to check the size of your $tetragraphs file when
you
>get to work tomorrow, just to be on the safe side :)
>
>Nnickee
>
>
>
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Wed, 12 Jul 2000 23:47:02 -0500
From: Nnickee <nnickee@nnickee.com>
Subject: Re: Bottleneck? Array or writing - neither?
Message-Id: <C87FB678E86B4D55.A799B4424044C0F1.19848ED3E314BAB5@lp.airnews.net>
On Thu, 13 Jul 2000 04:06:08 GMT, someone claiming to be
kcivey@cpcug.org (Keith Calvert Ivey) said:
>Nnickee <nnickee@nnickee.com> wrote:
>> <snip> the script had flipped out [read: "I did something really
>>stupid"] and the resulting file which should have been around 200k
>>when finished... was <gulp> 1.2 gigs.
>Let me guess: The program was processing a directory full of
>files, but it was also writing a log file to that same
>directory.
Nope. The script went out and grabbed an html page, and then modified
it (removed hidden form fields containing passwords, for instance).
I'm not sure exactly what the stupid thing that I did was -- it was
several months ago, and I fixed that script back when the above
happened, because I knew something was wrong -- the output file had a
variable name which included the date that the script was run, so the
fixed script never clobbered the messed up script's output.
>My most recent similar experience was running HTML
>Tidy on a directory and accidentally typing *.* instead of
>*.htm, while logging errors to a file in the same directory. It
>took me a minute to notice that the reason the processing wasn't
>finishing is that the error log was getting rather large,
>listing errors resulting from attempting to interpret the error
>log as an HTML file.
I could see myself doing that. At least you *did* notice what was
happening. I only knew something was wrong, but had no clue what, and
didn't even notice the consequences for quite a few months (at least I
can laugh about it now :)
This could get interesting... wonder if we can talk Randal and the
other Gurus into confessing their most recent perl "oops" (and if they
did, I wonder if I'd even understand what the heck they were talking
about? :)
Nnickee
------------------------------
Date: Thu, 13 Jul 2000 08:07:39 +0200
From: "Christoph Schmutz" <christoph.schmutz@fw.oebb.at>
Subject: Check Processes In An Unix Environment
Message-Id: <M0db5.7$wv3.323@nreader1.kpnqwest.net>
hi out there
please help me to find a way to check and/or control processes running in
(digital) unix.
maybe there is a special one to check the services of an oracle database.
thx
regards,
christoph
------------------------------
Date: Thu, 13 Jul 2000 04:08:41 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: command line input
Message-Id: <MPG.13d7de1a29f3d5b9989691@news>
Kiel Stirling wrote ..
>
>nvp@spamnothanks.speakeasy.org (NP) wrote:
>>On 12 Jul 2000 23:39:54 GMT, BFisher244 <bfisher244@aol.com> wrote:>: i am implementing a function and am trying to allow flags.
>>: How can I signal that there is a flag for all input?
>>
>>Why not use the Getopt modules: Getopt::Std or Getopt::Long?
>>
>>--
>>Nate
>>
>Why not use @ARGV?
>
>If you run your program with options ie,
> $ program -v -s -p
>$ARGV[0] will eq -v
>$ARGV[1] will eq -s and so on.
and what if you run it with
$ program -p -v -s
?? .. if you're testing $ARGV[0] for '-v' then it will fail - etc. ..
the Getopt modules take care of all the iteration .. plus accept values
as well as just option flags .. why reinvent the wheel ?
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Thu, 13 Jul 2000 05:49:36 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: command line input
Message-Id: <slrn8mqlqu.9rf.bernard.el-hagin@gdndev25.lido-tech>
On Thu, 13 Jul 2000 04:08:41 GMT, jason <elephant@squirrelgroup.com> wrote:
>Kiel Stirling wrote ..
>>
>>nvp@spamnothanks.speakeasy.org (NP) wrote:
>>>On 12 Jul 2000 23:39:54 GMT, BFisher244 <bfisher244@aol.com> wrote:>: i am implementing a function and am trying to allow flags.
>>>: How can I signal that there is a flag for all input?
>>>
>>>Why not use the Getopt modules: Getopt::Std or Getopt::Long?
>>>
>>>--
>>>Nate
>>>
>>Why not use @ARGV?
>>
>>If you run your program with options ie,
>> $ program -v -s -p
>>$ARGV[0] will eq -v
>>$ARGV[1] will eq -s and so on.
>
>and what if you run it with
>
> $ program -p -v -s
>
>?? .. if you're testing $ARGV[0] for '-v' then it will fail - etc. ..
If you insist on not using Getopt::* then you can always check *all* of
the options for *all* possible values (eg. if-elsif) and not rely on the
order of the options.
Bernard
--
Still can't find .signature: No such file or directory.
------------------------------
Date: Thu, 13 Jul 2000 05:20:40 GMT
From: d-lewart@uiuc.edu (Daniel S. Lewart)
Subject: Re: Convert "\xAB\xCD" into number 43981
Message-Id: <Ikcb5.2374$Il3.49835@vixen.cso.uiuc.edu>
"multiplexor" <abuse@localhost> writes:
> I have a string, say, "\xAB\xCD\xEF\xEF", and I want to convert it into a
> number. That is, treat the string as bytes. What is the simplest way to do
> that? I tried the followings but the result is strange to me:
> print join('', unpack('L*', "\xAB\xCD")), "\n"; #prints nothing
> print join('', unpack('L*', "\xAB\xCD\EF")), "\n"; #prints nothing
> print join('', unpack('L*', "\xAB\xCD\xEF\xEF")), "\n"; #prints 4025470379
> print join('', unpack('L*', "\xFF\xFB\x90\x74")), "\n"; #prints 1955658751 < 4025470379 !?
print unpack('N', "\x00\x00\xAB\xCD"), "\n"; # prints 43981
print unpack('N', "\x00\xAB\xCD\xEF"), "\n"; # prints 11259375
print unpack('N', "\xAB\xCD\xEF\xEF"), "\n"; # prints 2882400239
print unpack('N', "\xFF\xFB\x90\x74"), "\n"; # prints 4294676596
The Perl 5.6.0 documentation for (un)pack templates is vastly improved.
Daniel Lewart
d-lewart@uiuc.edu
------------------------------
Date: Thu, 13 Jul 2000 08:40:12 +0200
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Convert "\xAB\xCD" into number 43981
Message-Id: <4soqms4d4so95quct656p034j8mvgo0576@4ax.com>
multiplexor wrote:
>print join('', unpack('L*', "\xFF\xFB\x90\x74")), "\n"; #prints
>1955658751 < 4025470379 !?
You have an endianness problem. Your machine probably is little-endian,
while apparently you're asking for big-endian decoding. Use "n" and "N"
for big-endian, and "v" and "V" for little-endian.
$\ = "\n";
print unpack 'n', "\xAB\xCD";
print unpack 'N', "\xFF\xFB\x90\x74";
-->
43981
4294676596
Happy now?
(n.b. Your bytes got swapped.)
--
Bart.
------------------------------
Date: Thu, 13 Jul 2000 14:36:15 +0800
From: Bert <egberts@mac.com>
Subject: Re: Crypt() authentication not working for me...
Message-Id: <396D6360.A78EF6DB@mac.com>
Hi meatballs,
mexicanmeatballs@my-deja.com wrote:
> In article <396C2771.B83FBA8@mac.com>,
> Bert <egberts@mac.com> wrote:
> >
> > if (crypt($guess, $pass) eq $pass) {
> > #guess is correct
> > }
> >
> > so I have done it like the book says, BUT... why doesn't it work?
> >
>
> Just an observation, but crypt($guess, "") eq "", maybe
> you're getting a blank $pass from somewhere?
yes, u're darn right it does.... Someone else pointed that out to me as
well.... seemed like something was wrong with the tie::dbi thingy. So I
rewrote the thing in plain DBI and everything's cool now.
Thanks for your comments!
Bert
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Thu, 13 Jul 2000 00:29:08 -0500
From: Frank Samuelson <fwslsm@cnsp.com>
Subject: Does file locking in perl on rh6.2 linux just not work?
Message-Id: <396D53A4.8FA9192A@cnsp.must.fight.spam.com>
I have read the man page several times and surfed the net over on
file locking in perl, but I can't get it to work.
The following script prints:
->0<-
immediately, no matter how many incarnations of it I start within
5 seconds of each other. bucko is in the local directory on a
local filesystem.
#####################################
#!/usr/bin/perl
use Fcntl;
open(FTEMP,"bucko") || die "Couldn't open bucko\n";
$gg=flock(FTEMP,LOCK_EX);
print "->$gg<-\n";
sleep 20;
exit;
####################################
Any ideas on what could be wrong? I also can not get files
to lock using fcntl, like I can in C. I would prefer this,
because I would like to lock files over NFS. The script:
#############################################
#!/usr/bin/perl
use Fcntl;
open(FTEMP,"bucko") || die "Couldn't open bucko\n";
$lockst = pack('sslll',F_WRLCK, 0, 0, 0, 0);
$gg=fcntl(FTEMP, F_SETLKW,$lockst ) || -1; #do a blocking lock
print "->$gg<-\n";
sleep 20;
exit;
############################################
prints
->-1<-
which means I'm doing something wrong with the fcntl call.
In some examples I've seen &'s in front of the fcntl constants
and some people use "require('sys/fcntl.ph')" rather than
"use Fcntl".
By playing with these, I've gotten the below script to give:
->0 but true<-
However, this script, like the first one, prints that result
immediately regardless of how many incarnations of it I start
within 5 seconds of each other.
#############################################
#!/usr/bin/perl
open(FTEMP,"bucko") || die "Couldn't open bucko\n";
$lockst = pack('sslll',F_WRLCK, 0, 0, 0, 0);
$gg=fcntl(FTEMP, &F_SETLKW,$lockst ) || -1; #do a blocking lock
print "->$gg<-\n";
sleep 8;
exit;
############################################
Any help would be appreciated.
Frank
------------------------------
Date: 13 Jul 2000 08:27:07 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: executing system commands via cgi?
Message-Id: <8kjr0b$rcc$1@orpheus.gellyfish.com>
On Wed, 12 Jul 2000 12:12:30 GMT pkey@sghms.ac.uk wrote:
> Solaris
> Apache 1.3.12
> Perl
>
> I am having problems with a perl cgi script.
>
> I want a user to have access to their disc quota info via the web.
>
> The script is posted their user name and then executes the quota
> command:
>
> $quota1 = `quota -v $user`;
>
> The problem is that the 'quota' command needs to be run by root.
>
> The cgi is attempting to run the script as the user who entered their
> name (I think) as I get the following message:
>
> user (uid 123456): permission denied
>
> I set the script permission to:
>
> chmod 4755 my.cgi
>
Your OS might not support setuid scripts and the Perl was not built with
setuid emulation. Read perlsec manpage for more on this topic. (Although
Solaris is supposed to support setuid scripts). You also might need
to check that effective uid and real uid are the same for some programs
to run as they check and dont run if they arent. i.e. $> == $< .
> and quota still won't execute.
>
> Also, another thing - I do a ypmatch on the user to see if they exist
> before doing the quota:
>
> if (system("ypmatch $test_user passwd")==0)
>
> now, the output from the ypmatch command gets displayed in the web
> browser. Why is this? I thought it went to stdout and as it doesn't
> have backticks around it the web browser should not be sent the
> output?
>
Then redirect the output away somehow. Anything sent to STDOUT in a
CGI program will get to the users browser.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: Thu, 13 Jul 2000 16:04:39 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: Help!. Installed 5.6, now Crypt::xxx modules are broken.
Message-Id: <5Xcb5.60$BW3.6150@nsw.nnrp.telstra.net>
Installed 5.6 perl, (on FreeBSD 2.2) now
Crypt-IDEA
Crypt-DES
Crypt-Blowfish
Won't make - and the ones I installed on Perl5.2 are broken...
A 'make' complains about "sv_undef" being undefined, and the make exits.
Jeeeez. I really need these too. Does any kind soul have any idea what's
happened here.? It's happening on all three Crypt modules.
Thanks
Bob
------------------------------
Date: Thu, 13 Jul 2000 16:25:03 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: Re: Help!. Installed 5.6, now Crypt::xxx modules are broken.
Message-Id: <dedb5.69$BW3.6375@nsw.nnrp.telstra.net>
Follow-up.
In perl.h on the earlier versions, sv_undef is actually defined.
It isn't in 5.6 perl.5
It's defined instead in embedvars.h so does one include this in all the
things - or does one wait for someone who writes these things to catch up...
what a mess. Sometimes I really hate upgrades. nuclear chain reactions have
nothing on this...
Bob
"Robert Chalmers" <robert@chalmers.com.au> wrote in message
news:5Xcb5.60$BW3.6150@nsw.nnrp.telstra.net...
> Installed 5.6 perl, (on FreeBSD 2.2) now
>
> Crypt-IDEA
> Crypt-DES
> Crypt-Blowfish
>
> Won't make - and the ones I installed on Perl5.2 are broken...
> A 'make' complains about "sv_undef" being undefined, and the make exits.
>
> Jeeeez. I really need these too. Does any kind soul have any idea what's
> happened here.? It's happening on all three Crypt modules.
>
> Thanks
> Bob
>
>
------------------------------
Date: 13 Jul 2000 08:42:19 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How can I use HTML::Parser to get images from HTML file
Message-Id: <8kjrsr$u9s$1@orpheus.gellyfish.com>
On Wed, 12 Jul 2000 01:28:09 GMT salvadorej@my-deja.com wrote:
>
> how to get a list of URLs for images contained in an HTML file.
>
Heres one I made earlier :
#!/usr/bin/perl -w
package GetIMG;
@ISA = qw(HTML::Parser);
require HTML::Parser;
use strict;
my $parser = new GetIMG;
$parser->parse_file($ARGV[0]);
sub start()
{
my($self,$tag,$attr,$attrseq,$orig) = @_;
if ( $tag eq 'img')
{
for (keys %{$attr} )
{
print "$_ = > $attr->{$_}\n";
}
}
}
You might want to read the HTML::Parser manpage for more on this or check
out <http://www.gellyfish.com/htexamples/> for a brief explantation.
BTW with version 3 of HTML::Parser one could do :
#!/usr/bin/perl -w
use HTML::Parser;
use strict;
my $parser = HTML::Parser->new( api_version => 3,
start_h => [ \&start,"tagname,attr"];
$parser->parse_file($ARGV[0]);
sub start()
{
my($tag,$attr) = @_;
if ( $tag eq 'img')
{
for (keys %{$attr} )
{
print "$_ = > $attr->{$_}\n";
}
}
}
Which in this case isnt much simpler but doesnt need the sub-classing.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: Wed, 12 Jul 2000 23:12:30 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: how to capture the message return from the system()
Message-Id: <slrn8mqcsu.8le.tadmc@magna.metronet.com>
On Thu, 13 Jul 2000 10:00:53 +0800, Lucas Gump <lucas@cplhk.com> wrote:
>As title.
What is a title?
> Subject: how to capture the message return from the system()
What is a "message return"?
external programs have an "exit code" that you can get.
external programs have "output" that you can get too.
How to get either one can be found by simply reading about
the function that you are using!
perldoc -f system
Don't ask questions about functions that you have not read the docs for.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 13 Jul 2000 01:55:07 +1000
From: "Kiel Stirling " <taboo@doofa.net>
Subject: Re: HOW TO FTP A FILE IN PERL SCRIPT
Message-Id: <396c94db$1_2@nexus.comcen.com.au>
"lova" <nurain@singnet.com.sg> wrote:
>Hi>
>I am currently trying to write a script to FTP some files over to another
>machine and capture the output of the FTP command.
>
>How do I do this?
>
>Help needed urgently.
>
You could spend time working with a pipe to ftpd
or search cpan.org for Net::ftp which is a perl module
already setup to do it.
>Thanks
>
>Regards
>Nurain - Lova
>
>
------------------------------
Date: Thu, 13 Jul 2000 04:14:01 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: HOW TO FTP A FILE IN PERL SCRIPT
Message-Id: <MPG.13d7df58670be4ef989692@news>
lova wrote ..
>I am currently trying to write a script to FTP some files over to another
>machine and capture the output of the FTP command.
>
>How do I do this?
use Net::FTP
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: 13 Jul 2000 06:57:34 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: New to perl, need help
Message-Id: <8kjp8u$n4u$0@216.155.33.87>
In article <MPG.13d67646f3e7fb1298abc2@nntp.hpl.hp.com>, Larry Rosler
<lr@hpl.hp.com> wrote:
| Indeed, but as so often, a module isn't needed to implement one line of
| code. All it is is the familiar Orkish Maneuver.
I've heard the term used before with referral to sorting, IIRC, but I
still don't really understand this...
|
| #!/usr/bin/perl -w
| use strict;
|
| { my %fib;
| sub fibonacci {
| my $number = shift;
| $fib{$number} ||= $number < 2 ? $number :
| fibonacci($number - 1) + fibonacci($number - 2)
| } }
why doesn't %fib fall out of scope, not to mention the entire
subroutine? is it because, as far as the compiler can tell, it's NOT out
of scope until the calculations USING that sub are complete?
| print fibonacci($_), "\n" for 0 .. 15;
I modified it slightly to see what would happen for larger numbers, and
it STILL is remarkably fast.. I counted a FULL minute for the previous
script to calculate the fibonacci sequence for 26 and yet this one does
all the way to 75 in about 1 second or so.
#!/usr/bin/perl -w
use strict;
{ my %fib;
sub fibonacci {
my $number = shift;
$fib{$number} ||= $number < 2 ? $number :
fibonacci($number - 1) + fibonacci($number - 2)
} }
#gotta use the old form, cuz I only have 5.004 :]
for (1..75) {
print fibonacci($_), ", ";
#I decided to get sneaky and keep it from scrolling as much :D
print "\n" if !($_%4);
}
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Thu, 13 Jul 2000 00:51:14 -0500
From: "Jim Kauzlarich" <o1technospam@skyenet.nospam.net>
Subject: Newbie question on die and the diamond operator
Message-Id: <kGcb5.812$ol5.1976@newsfeed.slurp.net>
I'm trying to familliarise myself with the diamond operator. Everything has
been going well, until I decided to try to add the capacity to die. I've
tried various ways of isolating the die using brackets, but to tell the
truth, I'm stumped. I've looked through "Learning Perl" and can't seem to
find an answer either.
Here is a copy of my code, and it's output:
#! /usr/bin/perl
if ($ARGV[1] eq '-w') { pop (@ARGV); } # Remove the "Warn" command
line arguemt
if ($ARGV[0]) {
print "This program prints out the contents of any files that you supply
to it\n";
while ((<>) || ( die "Gakk! $!") ) { # This does not work
# while (<>) { # This works
print $_;
}
} else
print "You must supply a file name\n";
}
perl printfile.cgi dogs.txx -w
This program prints out the contents of any files that you supply to it
Can't open dogs.txx: No such file or directory
Gakk! No such file or directory at printfile.cgi line 5.
perl printfile.cgi dogs.txt
This program prints out the contents of any files that you supply to it
Gakk! at printfile.cgi line 7, <> chunk 1.
perl printfile.cgi dogs.txt -w
This program prints out the contents of any files that you supply to it
Gakk! at printfile.cgi line 7, <> chunk 1.
TIA!
------------------------------
Date: Thu, 13 Jul 2000 06:14:56 GMT
From: nvp@spamnothanks.speakeasy.org (NP)
Subject: Re: Newbie question on die and the diamond operator
Message-Id: <A7db5.338696$VR.5087902@news5.giganews.com>
Jim Kauzlarich <o1technospam@skyenet.nospam.net> wrote:
: I'm trying to familliarise myself with the diamond operator. Everything has
: been going well, until I decided to try to add the capacity to die. I've
: tried various ways of isolating the die using brackets, but to tell the
Why not die before you deal with <>?
prompt$ perl -e 'die("You must supply a file name.") if !@ARGV; \
while(<>) { # do something }' arg1 arg2 argN
--
Nate II
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 3647
**************************************