[13006] in Perl-Users-Digest
Perl-Users Digest, Issue: 416 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 7 19:05:54 1999
Date: Sat, 7 Aug 1999 16:05:07 -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 Sat, 7 Aug 1999 Volume: 9 Number: 416
Today's topics:
Re: a time to kill <rick.delaney@home.com>
Re: Capturing Browser Data (Greg Teets)
Checking if an URL is true or false ? <bruno.baguette@francemel.com>
Re: Checking if an URL is true or false ? <mike@crusaders.no>
Does anyone know where I can find... (Lance Stevenson)
Re: How? (Abigail)
Re: I guess this is a Misc question: Cgi-bin (Jon Bell)
Re: JavaScript or Perl? (Hywel Jenkins)
Re: just days away f7.8ez5.88ox <gbannister.rcts@argonet.co.uk>
Re: just days away f7.8ez5.88ox <slainte.mhath@cwcom.net>
lstat on a unicode file in NT? (Tom Shou)
Re: Newbie question about $_ <rick.delaney@home.com>
Re: Newbie question about $_ (Abigail)
Re: Newbie question about $_ (Abigail)
Re: Newbie question about $_ (Abigail)
Re: Newbie question about $_ (Abigail)
Re: Newbie question about $_ (Anno Siegel)
Re: Newbie question about $_ <uri@sysarch.com>
Re: newbie question: splitting hairs (Abigail)
Re: newbie question: splitting hairs (Anno Siegel)
Re: Nicer Way (Abigail)
Re: Nicer Way (Abigail)
object state maintained with Cookies? Is this possible <gilbjx1@hotmail.com>
Re: Problem with standard IO::Socket::INET module (Anno Siegel)
Re: Renaming a hash key ? (Abigail)
rows to columns (Eric Smith)
Re: Spider engine database script <khobbs@ias.uk.com>
Re: SSH2, Need a little help (Kevin Reid)
System call in Win NT, AS Build 518 <tamim1@home.com>
Re: what does this warning mean ? (Abigail)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 07 Aug 1999 21:06:01 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: a time to kill
Message-Id: <37AC9F97.9C375224@home.com>
[posted & mailed]
Abigail wrote:
>
> [comp.lang.perl.*]
> Score::500
> From: Alan J\. Flavell
> From: Anno Siegel
> From: brain d foy
^^^^^
If you really want to give him special treatment, you might want to fix
that. Or is that brian's smarter brother?
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Sat, 07 Aug 1999 22:06:48 GMT
From: teetsg@fuse.net (Greg Teets)
Subject: Re: Capturing Browser Data
Message-Id: <37acadac.67658969@nntp.fuse.net>
I looked all through the PerlMonth and could not find the article
you're referring to. Could you please give me a more detailed URL?
Thanks
Greg Teets
On Thu, 05 Aug 1999 15:22:25 GMT, Jeremy Gurney
<c4jgurney@my-deja.com> wrote:
>In article <933862238.8029@www.remarq.com>,
> Samay <anonymous@web.remarq.com> wrote:
>> Hi,
>> I would like to write simple perl script (may be
>> complicated) which deals with my surfing the Internet.
>
>There's an article in PerlMonth about this sort of thing.
>
>http://www.PerlMonth.com/
>
>HTH,
>
>Jeremy Gurney
>SAS Programmer | Proteus Molecular Design Ltd.
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
------------------------------
Date: Sat, 07 Aug 1999 21:05:41 GMT
From: Bruno Baguette <bruno.baguette@francemel.com>
Subject: Checking if an URL is true or false ?
Message-Id: <7oi730$h23$1@nnrp1.deja.com>
Hello,
I would like to check if an URL is true or false.
So, i think i should check the code that the server send when you go on
an url... (For example : If you try to get a bad url, you get the 404
code...)
So, i should check if the code begin with 2. All codes beginning with 2
means that the request was succesfull... (I've seen that in the "Teach
yourself CGI programming with Perl in a Week" book written by Eric
Herrmann)
So, the really big question is : How can i get this code ?
And the other question is : Do you think my idea good to check the URL ?
Thanks in advance !
-------------------------------------------------
Bruno Baguette (bruno.baguette@francemel.com)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sat, 7 Aug 1999 23:40:58 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Checking if an URL is true or false ?
Message-Id: <NK1r3.326$FX2.2137@news1.online.no>
Bruno Baguette <bruno.baguette@francemel.com> wrote in message
news:7oi730$h23$1@nnrp1.deja.com...
> I would like to check if an URL is true or false.
> So, i think i should check the code that the server send when you go on
> an url... (For example : If you try to get a bad url, you get the 404
> code...)
What do you intend to do? Do you have a list of URLs that you just want to
check periodically if still are valid, or do you intend to download the
contents of all those URLs?
> So, the really big question is : How can i get this code ?
perldoc LWP
An Example
This example shows how the user agent, a request and a
response are represented in actual perl code:
# Create a user agent object
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("AgentName/0.1 " . $ua->agent);
# Create a request
my $req = new HTTP::Request POST =>
'http://www.perl.com/cgi-bin/BugGlimpse';
$req->content_type('application/x-www-form-urlencoded');
$req->content('match=www&errors=0');
# Pass request to the user agent and get a response back
my $res = $ua->request($req);
# Check the outcome of the response
if ($res->is_success) {
print $res->content;
} else {
print "Bad luck this time\n";
}
or you could go for the simpler LWP::Simple
use LWP::Simple;
print $content if $content = get('http://www.perl.com/');
> And the other question is : Do you think my idea good to check the URL ?
It's always a good idea to check somethings return value.
--
Trond Michelsen
------------------------------
Date: 07 Aug 1999 22:55:52 GMT
From: zzredrumxx@aol.comNoSpam (Lance Stevenson)
Subject: Does anyone know where I can find...
Message-Id: <19990807185552.25923.00009151@ng-cn1.aol.com>
Does anyone know where I can find a free
perl search script that allows a user to select
different check boxes to determine the output
of their search?
Yes, I know that was confusing, so here is
an example of what I'm talking about.
Let's say you were running a dating network,
and in order for a user to search for his or
her blind date, you made them search for the
person right for him or her. So there would be
a web page something like this...
What kind of date are you loooking for?
White [ ]
Black [ ]
Indonesian [ ]
Spanish [ ]
South Polish [ ]
Do you see what I'm getting at? If so,
does anyone know where I might be
able to find one that was free?
Thanks in advance for any help you
might deliver.
Lance Stevenson
ZzReDRuMxX@aol.com
Remove NoSpam to e-mail me.
------------------------------
Date: 7 Aug 1999 17:01:39 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How?
Message-Id: <slrn7qpb5m.1dr.abigail@alexandra.delanet.com>
Craig (cmd@nospam_altnews.com.au) wrote on MMCLXVII September MCMXCIII in
<URL:news:37AC7F72.237E2379@nospam_altnews.com.au>:
[] If I get the Perl modules Net::FTP & Net::NNTP, how can I use them in a
[] script?
Why would you want to use them?
Abigail
--
perl -wle 'print "Prime" if (0 x shift) !~ m 0^\0?$|^(\0\0+?)\1+$0'
-----------== 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: Sat, 7 Aug 1999 21:04:53 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: I guess this is a Misc question: Cgi-bin
Message-Id: <FG4585.33y@presby.edu>
Ben Quick <newsgroup@bigwig.net> wrote:
>>!!
>>!! Lighten up
>>
>>*ploink*
>
>Meaning....
ploink (interjection): Dialectal variant of Standard Usenet English
"plonk." Indicates that the "plo(i)nkee" has been placed in the
"plo(i)nker's" killfile, i.e. that the "plo(i)nker" will no longer see any
postings from the "plo(i)nkee". Also used as a verb: "I plo(i)nked him."
Probably from the sound of an object hitting the bottom of a metal
(bit-)bucket.
--
Jon Bell <jtbell@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
[ Information about newsgroups for beginners: ]
[ http://www.geocities.com/ResearchTriangle/Lab/6882/ ]
------------------------------
Date: Sat, 7 Aug 1999 22:08:14 +0100
From: usenet@webdude.freeserve.co.uk.CutThis (Hywel Jenkins)
Subject: Re: JavaScript or Perl?
Message-Id: <MPG.1216ae45f8d7ce339899d4@news.freeserve.net>
In article <7ohhgq$l4v$1@plonk.apk.net>, Jody Fedor (JFedor@datacom-
css.com) said...
> I don't know where to ask this question:
>
> Does anyone know if there is a comparable function in JavaScript as Perl's
> "ord" function and "chop" function?
>
> Perl's "ord" function converts a character to its ASCII equivalent and the
> "chop"
> function removes the last character of a string.
>
> I'm trying to convert the following line of code to JavaScript:
>
> $num = ord(chop($test)) - 32;
Well, there's 'charCodeAt' (introduced in NN4) for the to ASCII
conversion, not sure about
'chop'.
--
Hywel
http://hyweljenkins.com/
------------------------------
Date: Sat, 07 Aug 1999 21:19:33 BST
From: Geoff Bannister <gbannister.rcts@argonet.co.uk>
Subject: Re: just days away f7.8ez5.88ox
Message-Id: <na.7a038d492e.a60150gbannister.rcts@argonet.co.uk>
In article <PXWnnTAY81q3EwkJ@stormshadow.co.uk>, Jack & Megan
<55009@[127.0.0.1]> wrote:
>
> <spamtrapped - domain is stormshadow (dot) co (dot) uk>
>
> In article <199908060843.DAA06280@reject.kewlhair.com>, reject
> <The@reject.kewlhair.com> writes
>
> >This is your last warning! Read CAREFULLY and be edified:
>
<snip>
As a practising Christian, I find this sort of nonsense very misleading to
other folk.
Perhaps our poster might like to look at Matthew 24:30-36, particularly the
last verse.......
--
__ __ __ __ __ ___ _____________________________________
|__||__)/ __/ \|\ ||_ | / geoffbannister@argonet.co.uk
| || \\__/\__/| \||__ | / Reviews Editor, Railway Observer
___________________________/
Come back, Bulleid, all is forgiven!
------------------------------
Date: Sat, 07 Aug 1999 23:49:20 +0100
From: -=SteveH=- <slainte.mhath@cwcom.net>
Subject: Re: just days away f7.8ez5.88ox
Message-Id: <37ACB7F0.EE2AFAB8@cwcom.net>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I recognise that greeting....
<p>Blessed be indeed. Merry meet, merry part, Goddess protect you !
<p>Slainte Mhath
<p>-=SteveH=-
<br> <a href="http://www.45015.mcmail.com">Help save 45015 !</a>
<p>Jack & Megan wrote:
<blockquote TYPE=CITE> </blockquote>
<snip>
<blockquote TYPE=CITE>Blessed be!
<p>:-)
<br>--
<br>Jack & Megan
<p>"Runnaway train, never coming back, wrong way down a one way track..."
<p><a href="http://www.stormshadow.co.uk">http://www.stormshadow.co.uk</a></blockquote>
</html>
------------------------------
Date: 7 Aug 1999 22:18:29 GMT
From: shou@logos.engr.sgi.com (Tom Shou)
Subject: lstat on a unicode file in NT?
Message-Id: <7oibbl$hrp$1@murrow.corp.sgi.com>
Hi,
I'm trying to open a unicode file on an Windows NT4.0 system, but
lstat (stat behaves the same way) doesn't seem to be able to examine
the file. The following lines don't print out any values:
($dev,$ino,$mode,$nlink) = lstat($_); # where $_ happens to be a unicode file
print "lstat output:$dev,$ino,$mode,$nlink \n";
Only the commas get printed so how can I lstat a unicode file? I guess
perl is having trouble figuring out how to deal with the unicode file
somehow.
Any ideas on how I can open a unicode file would be appreciated,
Thanks,
Tom
--
____________________________________________________________________
Tom Shou | shou@engr.sgi.com | SGI | 650.933.5362 | 650.932.5362 fax
http://reality.sgi.com/employees/shou_engr
------------------------------
Date: Sat, 07 Aug 1999 21:26:05 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Newbie question about $_
Message-Id: <37ACA44C.1AD64090@home.com>
[posted & mailed]
Uri Guttman wrote:
>
> A> Danger, Will Robinson, danger! Exterminate! Exterminate! Exterminate!
>
> lost in space; nomad the son of kirk space probe;
Nomad said, "Sterilize". Daleks from Dr. Who. And to think she
killfiled him.
> A> me up. This is Ripley - last survivor of The Nostromo - signing off.
>
> alien (which sequel?)
Not a sequel.
> A> I'm afraid I have no choice but to sell you all for medical
> A> experients.
The Meaning of Life.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: 7 Aug 1999 16:37:51 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Newbie question about $_
Message-Id: <slrn7qp9p0.1dr.abigail@alexandra.delanet.com>
Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCLXVII
September MCMXCIII in <URL:news:7ohqc5$hjp$1@lublin.zrz.tu-berlin.de>:
:: Abigail <abigail@delanet.com> wrote in comp.lang.perl.misc:
::
:: >(*&%$&^%$*&%^(*##+++++NO CARRIER
::
:: But it only prints synatx error.
Yeah, it took me ages to get an obscure program that printed
"synatx error", instead of "syntax error". Can you figure out how
it does that?
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
-----------== 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: 7 Aug 1999 16:41:51 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Newbie question about $_
Message-Id: <slrn7qpa0i.1dr.abigail@alexandra.delanet.com>
Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCLXVII
September MCMXCIII in <URL:news:7oi49i$hu4$1@lublin.zrz.tu-berlin.de>:
?? Uri Guttman <uri@sysarch.com> wrote in comp.lang.perl.misc:
?? >>>>>> "A" == Abigail <abigail@delanet.com> writes:
??
?? > A> but it's pronounced "Whoops!" er was eens een konijn. het konijn
?? > A> was erg vedrietig omdat het dacht dat het lelijk was. nou was dat ook
?? > A> wel zo, maar dat hoeft niet iedereen te weten. en omdat het konijn zo
?? > A> verdrietig was moest het heel hard huilen. Each morning, take the
?? > A> sock
?? >
?? >dutch??
??
?? Yes. Let me try. http://www.freedict.com/onldict/dut.html ready?
?? Let's go...
??
?? Once there was a rabbit. The rabbit was very sad because it thought it
?? was ugly. Now that was quite so, but not everybody needed to know that.
?? And because the rabbit was so sad it had to weep very hard.
That's an automatically generated translation? If so, I'm very impressed.
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
-----------== 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: 7 Aug 1999 16:45:34 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Newbie question about $_
Message-Id: <slrn7qpa7h.1dr.abigail@alexandra.delanet.com>
Trond Michelsen (mike@crusaders.no) wrote on MMCLXVII September MCMXCIII
in <URL:news:oS0r3.281$FX2.1199@news1.online.no>:
~~
~~ Uri Guttman <uri@sysarch.com> wrote in message
~~ news:x7so5vfkn3.fsf@home.sysarch.com...
~~ > >>>>> "A" == Abigail <abigail@delanet.com> writes:
~~ >
~~ > ok, the challenge now is to add all the attributions to this lovely
~~ > missive. some are very obvious and other are totally out of mind (and
~~ > english). i will start with the ones i can do with no work.
~~
~~ Hmm - You obviouly missed a few. I'll just add the ones I think I know.
~~
~~ > A> it. I can feel it. I can feel it. I'm a...fraid. They will dissect
~~ > A> you! And they will kill you! In that order! How many times do I have
~~
~~ Starship Troopers?
No. The genry is correct though.
~~ - It's 160 miles to Chicago, we have a full tank of gas and half a pack of
~~ sigarettes. It's dark and we're wearing sunglasses.
~~ - Hit it!
~~
~~ The one and sequel-less Blues Brothers
Ah, but what about Blues Brothers 2000 then?
~~ > A> Good. If I can annoy one luser a day, my time hasn't been wasted.
~~
~~ Sounds like something from "Bastard operator from Hell"
Yes it sounds like that. It's actually a quote from this newsgroup,
posted here less than a week ago.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== 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: 7 Aug 1999 16:54:39 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Newbie question about $_
Message-Id: <slrn7qpaoh.1dr.abigail@alexandra.delanet.com>
Uri Guttman (uri@sysarch.com) wrote on MMCLXVII September MCMXCIII in
<URL:news:x7so5vfkn3.fsf@home.sysarch.com>:
{} >>>>> "A" == Abigail <abigail@delanet.com> writes:
{}
{} ok, the challenge now is to add all the attributions to this lovely
{} missive. some are very obvious and other are totally out of mind (and
{} english). i will start with the ones i can do with no work.
{}
{}
{} A> Inproper question encountered. Don't panic! Panic! Don't panic!
{} A> CPU overload. Shields are at 30%. Bus driver on strike - core dumped.
{} A> Danger, Will Robinson, danger! Exterminate! Exterminate! Exterminate!
{}
{} lost in space; nomad the son of kirk space probe;
First one is correct; the second isn't. Unless it's a coincidence ;-)
Happy Funball will know where it's coming from.
{} A> Ash and Captain Dallas are dead. Cargo and ship destroyed. I should reac
{} A> the frontier in about 6 weeks. With a little luck, the network will pick
{} A> me up. This is Ripley - last survivor of The Nostromo - signing off.
{}
{} alien (which sequel?)
They are the last words of the original movie.
{} A> confusion of ideas that could provoke such a question. You see, one of
{} A> my favourite in-class demonstrations every year was to dip live rabbits
{} A> liquid nitrogen, then give them a good wack on the counter top. They wer
{} A> so remarkable frozen that they'd shatter like glass. Fear is the path
{}
{} <don't know but sounds like fun. i have played with liquid nitrogen and
{} it is very cool (sic)>
It's from a comic on the web. <URL:http://www.redmeat.com/comics/rm_298.htmlx>
{} A> and remember, it's spelled N-e-t-s-c-a-p-e,
{}
{} Mozilla;
If would, if that was the entire quote....
{} A> but it's pronounced "Whoops!"
But this belong to it as well.
It's from an article that revealed a serious security bug in Java/Netscape/MSIE.
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
-----------== 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: 7 Aug 1999 22:01:22 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Newbie question about $_
Message-Id: <7oiabi$i46$1@lublin.zrz.tu-berlin.de>
Abigail <abigail@delanet.com> wrote in comp.lang.perl.misc:
>Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCLXVII
>September MCMXCIII in <URL:news:7oi49i$hu4$1@lublin.zrz.tu-berlin.de>:
>?? Uri Guttman <uri@sysarch.com> wrote in comp.lang.perl.misc:
>?? >>>>>> "A" == Abigail <abigail@delanet.com> writes:
>??
>?? > A> but it's pronounced "Whoops!" er was eens een konijn. het konijn
>?? > A> was erg vedrietig omdat het dacht dat het lelijk was. nou was dat ook
>?? > A> wel zo, maar dat hoeft niet iedereen te weten. en omdat het konijn zo
>?? > A> verdrietig was moest het heel hard huilen. Each morning, take the
>?? > A> sock
>?? >
>?? >dutch??
>??
>?? Yes. Let me try. http://www.freedict.com/onldict/dut.html ready?
>?? Let's go...
>??
>?? Once there was a rabbit. The rabbit was very sad because it thought it
>?? was ugly. Now that was quite so, but not everybody needed to know that.
>?? And because the rabbit was so sad it had to weep very hard.
>
>
>That's an automatically generated translation? If so, I'm very impressed.
Oh dear, that'll teach me...
No, it's just a somewhat literal (ie neither literary nor especially
literate) one.
Anno
------------------------------
Date: 07 Aug 1999 18:17:35 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Newbie question about $_
Message-Id: <x7n1w3fd6o.fsf@home.sysarch.com>
>>>>> "RD" == Rick Delaney <rick.delaney@home.com> writes:
RD> [posted & mailed]
RD> Uri Guttman wrote:
>>
A> Danger, Will Robinson, danger! Exterminate! Exterminate! Exterminate!
>>
>> lost in space; nomad the son of kirk space probe;
RD> Nomad said, "Sterilize". Daleks from Dr. Who. And to think she
RD> killfiled him.
true. i crossed them up.
A> me up. This is Ripley - last survivor of The Nostromo - signing off.
>>
>> alien (which sequel?)
RD> Not a sequel.
i think of the first as part of the series. my use of sequel was very loose.
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: 7 Aug 1999 17:23:19 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: newbie question: splitting hairs
Message-Id: <slrn7qpceb.1dr.abigail@alexandra.delanet.com>
Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCLXVII
September MCMXCIII in <URL:news:7ohs14$hkl$1@lublin.zrz.tu-berlin.de>:
~~ David Cassell <cassell@mail.cor.epa.gov> wrote in comp.lang.perl.misc:
~~ >
~~ >perl -wlane 'print @F[1], @F[2]' file
~~
~~ Why switch on warnings with that?
Because it triggers a warning, twice.
Scalar value @F[1] better written as $F[1] at -e line 1.
Scalar value @F[2] better written as $F[2] at -e line 1.
Abigail
--
perl -wle 'print "Prime" if ("m" x shift) !~ m m^\m?$|^(\m\m+?)\1+$mm'
-----------== 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: 7 Aug 1999 22:35:22 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: newbie question: splitting hairs
Message-Id: <7oicba$i5f$1@lublin.zrz.tu-berlin.de>
Abigail <abigail@delanet.com> wrote in comp.lang.perl.misc:
>Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCLXVII
>September MCMXCIII in <URL:news:7ohs14$hkl$1@lublin.zrz.tu-berlin.de>:
>~~ David Cassell <cassell@mail.cor.epa.gov> wrote in comp.lang.perl.misc:
>~~ >
>~~ >perl -wlane 'print @F[1], @F[2]' file
>~~
>~~ Why switch on warnings with that?
>
>Because it triggers a warning, twice.
>
> Scalar value @F[1] better written as $F[1] at -e line 1.
> Scalar value @F[2] better written as $F[2] at -e line 1.
That's why I asked. I mean, either you know it gives you a warning, but
want to ignore it (though why you would in this case escapes me). Then
you don't use -w. Or you rewrite it so it doesn't warn. The you show
off the fact by switching them on.
Some of your one-liners don't have a -w. Those I tested showed that
you know why.
Anno
------------------------------
Date: 7 Aug 1999 17:03:15 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Nicer Way
Message-Id: <slrn7qpb8n.1dr.abigail@alexandra.delanet.com>
Scott Beck (admin@gatewaysolutions.net) wrote on MMCLXVII September
MCMXCIII in <URL:news:rqohn6emkur21@corp.supernews.com>:
`` I am sure there is a nicer way to write this so I am not even going to pose
`` that question.
`` What is the nicer way?
If it prints "Please".
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: 7 Aug 1999 17:17:53 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Nicer Way
Message-Id: <slrn7qpc43.1dr.abigail@alexandra.delanet.com>
Larry Rosler (lr@hpl.hp.com) wrote on MMCLXVII September MCMXCIII in
<URL:news:MPG.121600294528cf0a989dff@nntp.hpl.hp.com>:
??
?? #!/usr/local/bin/perl -w
?? use strict;
??
?? my $chmod = 'rwxr-xr-x';
?? ($_ = $chmod) =~ tr/rwx-/4210/;
?? $chmod = '';
?? $chmod .= $1 + $2 + $3 while /(.)(.)(.)/g;
?? print "$chmod\n";
?? __END__
And if you want to frot the transformation in one statement:
$chmod = join "" => map {eval join "+" => split //}
grep {length} split /(...)/ => do {$str =~ y.rwx-.4210.; $str};
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
-----------== 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: Sat, 07 Aug 1999 15:57:48 -0700
From: J Gilbert <gilbjx1@hotmail.com>
Subject: object state maintained with Cookies? Is this possible?
Message-Id: <37ACB9EC.D240DC32@hotmail.com>
I was wondering is it possible to use cookies to keep object persistance
going as users go through our website?
Thanks in advance for time,
Jeff
gilbjx1@hotmail.com
PS. We like to avoid writing files to our system to maintain state.
------------------------------
Date: 7 Aug 1999 21:31:50 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Problem with standard IO::Socket::INET module
Message-Id: <7oi8k6$i0p$1@lublin.zrz.tu-berlin.de>
He whom the perl gods have cursed <hughd@screwspam.com> wrote in comp.lang.perl.misc:
>Will someone please take pity on me and show me how to propitiate the perl gods?
Trimming your lines to 72 chars or so would be a good start.
Anno
------------------------------
Date: 7 Aug 1999 17:29:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Renaming a hash key ?
Message-Id: <slrn7qpcpp.1dr.abigail@alexandra.delanet.com>
Matthew Bafford (*@dragons.duesouth.net) wrote on MMCLXVII September
MCMXCIII in <URL:news:slrn7qohgm.bg.*@dragons.duesouth.net>:
''
'' But you can squish it down slightly:
''
'' $hash{new_key} = delete $hash{old_key};
Note that all suggested methods so far create $hash {new_key} if
$hash {old_key} doesn't exist.
Perhaps one should use:
$hash {new_key} = delete $hash {old_key} if exists $hash {old_key};
There's one caveate. If %hash is tied, delete doesn't necessarely return
the old value, according to the manual. (Why is that??)
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
-----------== 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: 7 Aug 1999 19:08:11 GMT
From: eric@fruitcom.com (Eric Smith)
Subject: rows to columns
Message-Id: <slrn7qp119.ju8.eric@plum.fruitcom.com>
Hi there
I have been uable to iterate through this file and convert the following
structure:
chair,hair,person,ball
table,nose,man,bat
floor,mouth,woman,wicket
to this:
chair,table,floor
hair,nose,mouth
person,man,woman
ball,bat,wicket
The obvious thing for me was to use an iterator with its range set to the
number of elements in the line. So I planned to loop through the lines
with the iterator set to `0' and then up to (in this case) `3'. But the
problem I could not solve with this for loop:
for ($i=0;$i<$#arry;$i++)
was that the iteration progresses from 0 to $# on each line. So it does the
iteration on each line insted of doing the full loop and _then_ an iteration.
What is a way to do this transformation?
--
Eric Smith
eric@fruitcom.com
www.fruitcom.com
It is easier to fix Unix than to live with NT.
------------------------------
Date: Sat, 7 Aug 1999 22:21:02 +0100
From: "Ken" <khobbs@ias.uk.com>
Subject: Re: Spider engine database script
Message-Id: <37acb274.0@news2.cluster1.telinco.net>
I'm looking for this kind of thing aswell...any body out there who can help?
Ken
Craig <cmd@nospam_altnews.com.au> wrote in message
news:37AC7738.ACE03DDF@nospam_altnews.com.au...
> I am looking for a script which users can add ftp/http urls & the script
> will spider dirs & files and add the descriptions to a database. Anyone
> know of one around?
>
> Thanks a lot......
>
> Craig
>
>
------------------------------
Date: Sat, 7 Aug 1999 17:10:35 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: SSH2, Need a little help
Message-Id: <1dw51o9.mvzkas1wp71ccN@imac.loc>
Xeno Campanoli <xeno@bigger.aa.net> wrote:
> How do I do:
> @x = qw( C D . _ # M X N M V ALL )
> so that when using:
> #!/usr/bin/perl -w
> it doesn't yell at me about the sharp in the qw()?
Another way is:
@x = qw( C D . _ ), '#', qw( M X N M V ALL );
BTW, I think that warning is more annoying than useful.
--
Kevin Reid: | Macintosh:
"I'm me." | Think different.
------------------------------
Date: Sat, 07 Aug 1999 21:17:05 GMT
From: Tamim Hofioni <tamim1@home.com>
Subject: System call in Win NT, AS Build 518
Message-Id: <37ACA42F.C4058941@home.com>
Hello everyone,
About a year ago I wrote a simple perl script on a windoze NT box using
ActiveState's Build 502 that had the following line in it:
system("write.exe $text_file");
This would start up WordPad in Windoze and open the text file for the
user to view. Recently, the perl interpreter was "upgraded" to
Activestate's Build 518 for the better OLE stuff, but the system call
doesn't work like it used to. Now, windoze NT starts WordPad but it
doesn't display it on the screen -- I can see the process ID running,
but the application isn't visible to the user. Is there a parameter to
set here so that windoze runs it in the foreground? Perhaps qx should
be used?
Any comments? (other than don't use windows -- this is a work machine
and they won't allow Linux!) Beuhler?
-- Tamim
-- Great quotes in history >>> Socrates: "I drank what?"
------------------------------
Date: 7 Aug 1999 17:00:46 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: what does this warning mean ?
Message-Id: <slrn7qpb3u.1dr.abigail@alexandra.delanet.com>
Hong Yuan (hongy@panther.cs.ucla.edu) wrote on MMCLXVII September
MCMXCIII in <URL:news:7ofun7$eto$1@news.cs.ucla.edu>:
@@ Hi,
@@
@@ I came across a warning message and had no idea what it means. I
@@ stripped away the rest of the code and got this minimal script that
@@ still produces the warning:
@@
@@ perl -we 'open(F,"z"); my $line; while ($line=<F>){} close F'
@@
@@ Warning: Value of <HANDLE> construct can be "0"; test with defined() at
@@ -e line 65535.
It should be explained in 'man perldiag'.
It warns you because in the extreme rare case of a file ending with
"\n0" (no trailing newline), the last line will not be processed.
@@ If I change the "while" line to: while (<F>){}
@@ The warning would disappear.
Yes, because while (<F>) as an implicite "defined" test wrapped around
it. And in perl5.005, while ($line = <F>) {} will have the same implicite
defined as well.
@@ This is on perl version 5.004_04 built for sun4-solaris.
@@
@@ Any idea?
Either upgrade, or wrap a defined test around it.
Abigail
--
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
for (s;s;s;s;s;s;s;s;s;s;s;s)
{s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
-----------== 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: 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". 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 V9 Issue 416
*************************************