[10327] in Perl-Users-Digest
Perl-Users Digest, Issue: 3921 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 7 17:07:23 1998
Date: Wed, 7 Oct 98 14:01:41 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 7 Oct 1998 Volume: 8 Number: 3921
Today's topics:
Re: perl html tag parser ekaull@my-dejanews.com
Re: Perl pattern matching implementation (Mark-Jason Dominus)
Re: Perl reg exp more reliable than sed? <rootbeer@teleport.com>
Re: Perl Robots (Steve Linberg)
Re: Perl Robots <browser@dataark.demon.co.uk>
Re: Perl Robots <nick@malloc.org>
Re: Perl Robots (Larry Rosler)
Re: Perl-based script for a metasearch engine <rootbeer@teleport.com>
Re: Perl: time check question <rootbeer@teleport.com>
Re: Pizza Hut advertises for CPAN (Adam Turoff)
Re: Poll: How Did You Learn Perl? (Mark W. Schumann)
Re: POLL: Perl features springing into your face <merlyn@stonehenge.com>
Re: POLL: Perl features springing into your face <h.b.furuseth@usit.uio.no>
Question/Logging Scripts (steve)
Re: Question/Logging Scripts <rootbeer@teleport.com>
Re: read subdirectories droby@copyright.com
Redirecting std(err & out) to a perl sub? sferris@my-dejanews.com
Re: Redirecting std(err & out) to a perl sub? <rootbeer@teleport.com>
Re: regexp with variable substitution values <aqumsieh@tigre.matrox.com>
Re: scope of my using () <r28629@email.sps.mot.com>
Re: scope of my using () <due@whitecrow.net>
Re: send geroge reese (was Re: Call for Participation: (Abigail)
Re: Syntax Question (What the 'ell does that mean?!) <rootbeer@teleport.com>
talking to myself (pg 343 camel book [2nd edition]) <LLJ001@email.mot.com>
Re: Timing An LWP get request <rootbeer@teleport.com>
Re: What does $INPUT{'name'} =~ s/\s+$//; do?? (I'm a n <aqumsieh@tigre.matrox.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 07 Oct 1998 19:03:31 GMT
From: ekaull@my-dejanews.com
Subject: Re: perl html tag parser
Message-Id: <6vgdu2$dn8$1@nnrp1.dejanews.com>
Well, thanks again. I will be implementing those changes. You have to admit
though, it's not to bad for a perl novice. Also, you're right, I
misunderstood the + sign. BTW, I will be going through your first suggestion
just to understand it so, it was not in vain. :-)
- EK
In article <m3soh0pfqn.fsf@joshua.panix.com>,
Jonathan Feinberg <jdf@pobox.com> wrote:
> ekaull@my-dejanews.com writes:
>
> > if ($listing[$index]=~/href+\s*\=+\"+(.*)\s*\"+/i)
> ^^ ^^^^^^^^^^ ^^^
> this is wrong.
>
> I don't think you understand what + does in a regex. Also, almost all
> of those backslashes are unnecessary, and make it harder to read your
> regex. But the most serious problem is that if the line in question
> looks like
>
> <a href="http://foo.com/">A</a> <a href="http://bar.com/">B</a>
>
> then $1 will contain
>
> http://foo.com/">A</a> <a href="http://bar.com/
>
> which is certainly not what you intend. Use [^"] instead of .
>
> > {
> > $listing[$index]=~s/(href+\s*\=+\"+)([^"]*)/$1\L$2/gi; # mine works
> >
> > }
>
> Why are you doing the regex twice? Just do the substitution. If the
> stuff isn't there, nothing will happen to the string.
>
> --
> Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
> http://pobox.com/~jdf
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 7 Oct 1998 15:07:12 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Perl pattern matching implementation
Message-Id: <6vge50$jmr$1@monet.op.net>
In article <361ABF19.77897BFB@richmond.edu>,
Olga Troyanskaya <otroyans@richmond.edu> wrote:
>I've been trying to find out how pattern matching is implemented in PERL
>(algorithms etc.), but cannot find any sort of reference on the
>subject. Does anyone know a good place to check on that? I'd really
>appreciate any help/advice.
The implementation in the Perl source code is not too hard to
understand; it is in the files `regcomp.c' and `regex.c'.
There is an article about how regex matching works at
<URL:http://www.plover.com/~mjd/perl/Regex/>. The method it
describes is not exactly what Perl uses, but it is very similar.
------------------------------
Date: Wed, 07 Oct 1998 20:17:44 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl reg exp more reliable than sed?
Message-Id: <Pine.GSO.4.02A.9810071316020.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, koji kiyokawa wrote:
> I did
>
> sed 's/\0//' filename
>
> But this actually removed some zeros too.
>
> When I used Perl
> Everything worked fine. Is there a logical explanation to this?
Yes: Perl doesn't have sed's bugs. Perl's bugs are all its own. :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 07 Oct 1998 15:07:01 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Perl Robots
Message-Id: <linberg-0710981507010001@ltl1.literacy.upenn.edu>
In article <6vgacs$bar$1@news-1.news.gte.net>, "Chris \"HTMLpro\" Alas"
<rcpowerpro@geocities.com> wrote:
> I am!! That sounds really cool.
> Although, I'm not skilled in Perl, CGI, C+,C++ or any other languages, I can
> still make great web pages. If you need one for this idea, let me know.
>
> here's my lego page: http://legobotics.hypermart.net/frames.html
Your great web pages would be even greater if they contained valid html. :)
<http://validator.w3.org/check?uri=http%3A%2F%2Flegobotics.hypermart.net%2Fframes.html>
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 07 Oct 1998 20:51:56 +0000
From: adam <browser@dataark.demon.co.uk>
Subject: Re: Perl Robots
Message-Id: <361BC65C.5A983AB5@dataark.demon.co.uk>
Yeah, I know what you mean about HTML, glass house and stones :)
but I think the lego was good
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.literacyonline.org
Steve Linberg wrote:
>
> In article <6vgacs$bar$1@news-1.news.gte.net>, "Chris \"HTMLpro\" Alas"
> <rcpowerpro@geocities.com> wrote:
>
> > I am!! That sounds really cool.
> > Although, I'm not skilled in Perl, CGI, C+,C++ or any other languages, I can
> > still make great web pages. If you need one for this idea, let me know.
> >
> > here's my lego page: http://legobotics.hypermart.net/frames.html
>
> Your great web pages would be even greater if they contained valid html. :)
>
> <http://validator.w3.org/check?uri=http%3A%2F%2Flegobotics.hypermart.net%2Fframes.html>
> _____________________________________________________________________
> Steve Linberg National Center on Adult Literacy
> Systems Programmer &c. University of Pennsylvania
> linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Thu, 08 Oct 1998 00:03:47 +0100
From: Nick Moraitakis <nick@malloc.org>
Subject: Re: Perl Robots
Message-Id: <361BF353.473470AA@malloc.org>
Chris \"HTMLpro\" Alas wrote:
> I am!! That sounds really cool.
> Although, I'm not skilled in Perl, CGI, C+,C++ or any other languages, I can
> still make great web pages. If you need one for this idea, let me know.
>
> here's my lego page: http://legobotics.hypermart.net/frames.html
C+? What language is this? I've never heard of it...
------------------------------
Date: Wed, 7 Oct 1998 13:44:59 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl Robots
Message-Id: <MPG.108572a1f51774169897f5@nntp.hpl.hp.com>
In article <361BF353.473470AA@malloc.org> on Thu, 08 Oct 1998 00:03:47
+0100, Nick Moraitakis <nick@malloc.org> says...
> Chris \"HTMLpro\" Alas wrote:
> > Although, I'm not skilled in Perl, CGI, C+,C++ or any other languages, I can
> > still make great web pages. If you need one for this idea, let me know.
>
> C+? What language is this? I've never heard of it...
It is not a language. It is a mediocre grade.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 07 Oct 1998 20:45:55 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl-based script for a metasearch engine
Message-Id: <Pine.GSO.4.02A.9810071345350.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, Jonathan Murphy wrote:
> Is there a Perl-based script for a metasearch engine?
Yes.
If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 07 Oct 1998 20:03:32 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl: time check question
Message-Id: <Pine.GSO.4.02A.9810071258510.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, Papadopoulos Stratos wrote:
> Is it possible to retrieve the local time through a time server,
> instead of reading it from the local web server (using the date
> function)?
It sounds as if you're talking about socket programming. Yes, perl can do
that.
> I would be grateful if you can send me a code fragment that performs
> such a function.
There is plenty of sample code around which shows how to use sockets.
Check the Perl docs, your system's docs, or any good book or website about
socket programming. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 7 Oct 1998 15:55:18 -0400
From: ziggy@panix.com (Adam Turoff)
Subject: Re: Pizza Hut advertises for CPAN
Message-Id: <6vggv6$1kd@panix.com>
ch <wodehouse@cheerful.com> wrote:
>miko@idocs.com wrote in message <6vfrfl$2h2$1@nnrp1.dejanews.com>...
>>Has anyone else noticed that the new Pizza Hut logo for their pan pizza
>looks
>>like it reads "CPAN"? I keep glancing at the TV to discover that there are
>>now wonderfully filmed national ads for CPAN, and I think "wow, CPAN must
>>really want some traffic".
>
>You're damn right (see www.pizzahut.com). I wonder how many new Perl users
>we'll see before the end of the year who were triggered by unconscious
>desires for CPAN.
Two of Ted Turner's cable stations are C-SPAN and C-SPAN2. Never thought
much of that until I saw the C-SPAN van parked nearby, wishing I had
some posterboard to cover up the ctrl-S. :-)
CPAN: the Cable Network.
Z.
------------------------------
Date: 7 Oct 1998 16:43:02 -0400
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <6vgjom$h32@junior.apk.net>
In article <36094AA5.6047F67E@nortel.ca>,
Cristian Pavel <cpavel@nortel.ca> wrote:
The original is expired here so I'll just follow up a followup.
>From what resource(s) did you learn Perl?
>
>. Llama v.1 - No
>. Llama v.2 - No
>. Camel v.1 - No
>. Camel v.2 - No
>. Other book (give name): No
>. Docs included in the distribution - ***Yes***
>. Something on the WWW - No
>. Studying existing code - Hardly
>. Class/tutor - None
Honestly, just plain "man perl" offers so much. I never really felt a need
to look elsewhere, even when using Perl 4, which didn't have quite the same
depth of documentation.
The man pages that come with Perl 5 are superior to the vast majority of
printed "how to" books I've seen for any programming language.
------------------------------
Date: Wed, 07 Oct 1998 16:26:31 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: POLL: Perl features springing into your face
Message-Id: <8cr9wkwd6z.fsf@gadget.cscaper.com>
>>>>> "Peter" == Peter Scott <psl@euclid.jpl.nasa.gov> writes:
Peter> How about this: since programs that use barewords tend to have a fairly
Peter> small set of them, what about an optional preclararion pragma a la use vars:
Peter> use barewords qw(-text -code name job salary title);
Peter> presumably in combination with some pragma which would outlaw all other
Peter> barewords...
you could write that already... it just needs to turn into
a compiletime:
use constant name => 'name';
which is really
sub name () { "name" }
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 07 Oct 1998 22:07:16 +0200
From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
Subject: Re: POLL: Perl features springing into your face
Message-Id: <HBF.981007tc0i@bombur2.uio.no>
Ilya Zakharevich writes:
>> barewords - if you want a quoted string, for gosh sakes put $#@!
>> quotes around it!
>
> Definitely I like barewords where they are unambiguous: in ->{foo},
> foo => and `use foo'.
...until someone invents a keyword `foo', or feeds a keyword to a
script which generates code like `$x->{foo}':-(
$ perl5 -wle 'print {time => 5}->{time};'
Ambiguous use of time => resolved to "time" => at -e line 1.
Ambiguous use of {time} resolved to {"time"} at -e line 1.
5
--
Hallvard
------------------------------
Date: Wed, 07 Oct 1998 19:54:49 GMT
From: pevets@yahoo.com (steve)
Subject: Question/Logging Scripts
Message-Id: <361bc60a.9527306@news.uml.edu>
Anyone know how i can log the refering url when someone comes
to my page. Im using $ENV{'HTTP_REFERER'} but it only seems to get
the url if its from one of the web pages within my site. Like it woul
log http://www.blah.com/blah.htm, where my wite was
http://www.blah.com/ but not http://www.yahoo.com.
Also if anyone knows how to make a perl script print stuff to a
certain place on a web page. So i can embed info in a table. Please
email me. pevets@yahoo.com
-steve
------------------------------
Date: Wed, 07 Oct 1998 20:54:43 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Question/Logging Scripts
Message-Id: <Pine.GSO.4.02A.9810071351510.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, steve wrote:
> Anyone know how i can log the refering url when someone comes
> to my page.
Sounds as if you're doing something with a webserver. The docs, FAQs, and
newsgroups about webservers and related issues may be helpful.
> Also if anyone knows how to make a perl script print stuff to a
> certain place on a web page.
The docs on HTML may help you here. Of course, the perlfunc manpage will
tell you how to use perl's print function. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 07 Oct 1998 18:55:57 GMT
From: droby@copyright.com
Subject: Re: read subdirectories
Message-Id: <6vgdft$d2e$1@nnrp1.dejanews.com>
In article <Y3wJ4PA$WlG2EwBS@connected.demon.co.uk>,
Jerry Pank <jerryp.usenet@connected.demon.co.uk> wrote:
> In <comp.lang.perl.misc>
> John Porter <jdporter@min.net>, writes:
> >Pete Ratzlaff wrote:
> >>
> >> Here's one I wrote up in a hurry which recursively prints all
> >> subdirectories of a given directory. Modify to suit your own needs:
> >
> >I sure do wonder what people have against using standard, robust,
> >portable modules like File::Find.
> >
> <PEDANT> It's not Taint friendly </PEDANT> :-)
But you want to define %ENV yourself if you're using -T anyway, don't you?
;-)
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 07 Oct 1998 20:15:39 GMT
From: sferris@my-dejanews.com
Subject: Redirecting std(err & out) to a perl sub?
Message-Id: <6vgi5b$lh0$1@nnrp1.dejanews.com>
I have a bunch of scripts in which generate logs. I often use
the same format in each case. I built a module which handles
this for me. EG: myPrint($), myErr($), etc.. One thing that I've
recently run into is having to use a system call to like 'rcp'
and would really like to trap there std(err&out) and pass it to
my subs to print it nicely formatted into my logs. Basically, is
there an equivelent SIG for STDERR and STDOUT as there is for WARN
and DIE? Or is there some way I could emulate this functionality?
I'm guessing that the solution is probably easier than I'm making
it, but I thought I'd ask anyway..
Thanks for any help in advance.
Shawn Ferris
Oracle DBA - Time Warner Telecommunications
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 07 Oct 1998 20:56:02 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Redirecting std(err & out) to a perl sub?
Message-Id: <Pine.GSO.4.02A.9810071355310.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998 sferris@my-dejanews.com wrote:
> is there an equivelent SIG for STDERR and STDOUT as there is for WARN
> and DIE? Or is there some way I could emulate this functionality?
Try a tied filehandle. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 07 Oct 1998 15:05:26 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: regexp with variable substitution values
Message-Id: <x3y7lycqjk9.fsf@tigre.matrox.com>
bhilton@tsg.adc.com (Brand Hilton) writes:
> >$string =~ s/subtag/$array[$i++]/ge; # NB /e !
> >
> >...shurely?
>
> BZZZT! Thank you for playing :-)
>
> The /e isn't necessary, and
Quite true;
> yields a null string for the substitution value.
Quite false .. it works fine .. but it violates the rule of laziness:
"The less you type, the better the code is"
;)
--
Ala Qumsieh | No .. not Just Another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: Wed, 07 Oct 1998 13:35:21 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: scope of my using ()
Message-Id: <361BB469.50840A12@email.sps.mot.com>
Mark-Jason Dominus wrote:
>
> In article <6vfq31$4i8$0@206.165.167.139>, AmD <Allan@due.net> wrote:
> >If you run the following it will print "Hash is defined"
>
> At present, `defined' is not meaningful for hashes or arrays; only for
> scalars. Using it returns a bizarre result.
The Camel book (2nd Ed.) says
##
You may also check to see whether arrays, hashes or
subroutines exist. Using 'defined' on the predefined
variables is not guaranteed to produce intuitive results.
##
But perldod (Perl5.005) says
##
On the other hand, use of C<defined()> upon aggregates
(hashes and arrays) is not guaranteed to produce intuitive
results, and should probably be avoided.
##
Hmm.. I am confused.
------------------------------
Date: 7 Oct 1998 20:25:35 GMT
From: "AmD" <due@whitecrow.net>
Subject: Re: scope of my using ()
Message-Id: <6vginv$i6m$0@206.165.146.26>
[copy ccd to author]
Mark,
Sorry, I didn't really mean that you needed to answer my question per
se. I was just trying to be clearer. In one of my scripts a subroutine
parses data from a file and creates a hash from the information. This hash
is then used to in making modifications to other files. However, under
certain, unpredictable, conditions the subroutine may fail in which case the
hash returned from the subroutine will be undefined. In such a case, I
obviously need to alter the flow of my script. I was under the
misapprehension that defined would be a good way to check the status of the
returned hash, it is clear from your and other posts that such a strategy
may produce non-intuitive results. My results where certainly counter to my
intuition <grin>. Actually, the script and approach work fine if I don't
declare the variable using the parens so I was curious why that made a
difference.
I really did not want to post the entire code (it is kind of large) so I
tried to simplify the code to illustrate the basic question that illustrated
the problem I was encountering.
Thanks again for your help.
AmD
Mark-Jason Dominus wrote in message <6vgcsq$jhs$1@monet.op.net>...
>In article <6vg3s0$l3n$0@206.165.146.112>, AmD <due@whitecrow.net> wrote:
>> Thanks for the reply. What I am trying to discover is whether my
>>subroutine successfully creates a hash.
>
>Why? To what end? What are you really trying to accomplish?
>
>
>>In my script the hash is returned as undefined if
>
>Stop saying that; you'll only confuse yourself. `defined' is
>meaningless for hashes.
>
>>should I ...
>
>I don't understand what you really want, so I can't come up with any
>advice that is likely to be correct for your situation.
>
>I suspect that you have a misconception about how hashes work, but I'm
>not sure, because your article never actually says what you expect; it
>only implies it.
>
>Sometimes in situations like this is is useful to show some code and
>say ``This code does X; I thought it would do Y.''
>
------------------------------
Date: 7 Oct 1998 20:01:53 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: send geroge reese (was Re: Call for Participation: Python Conference)
Message-Id: <6vghbh$6t2$1@client3.news.psi.net>
Zenin (zenin@bawdycaste.org) wrote on MDCCCLXIII September MCMXCIII in
<URL:news:907778800.622378@thrush.omix.com>:
++ Abigail <abigail@fnx.com> wrote:
++ : Zenin (zenin@bawdycaste.org) wrote on MDCCCLXII September MCMXCIII in
++ >snip<
++ : ++ Encapsulation, data abstraction, lower name collisions, etc.
++ :
++ : You don't need OO for that. In fact, when using procedures and packages
++ : I already have 'my' variables and namespaces. Have had those for many,
++ : many years.
++
++ $thing = Some::Really::Deep::Package::Name::Foo::makeMeAThing();
++ Some::Really::Deep::Package::Name::Foo::doSomethingWithIt($thing);
++ Some::Really::Deep::Package::Name::Foo::doSomethingElse($thing);
++ $bar = Some::Really::Deep::Package::Name::Bar::makeMeAThing();
Does that mean you are unaware of 'package' and Exporter.pm?
++ : It still amazes me that perl5 introduced both 'my', 'use strict' and
++ : its silly way of creating objects.
++
++ It may be silly, but it's quite a bit more flexible and more
++ powerful then most others. The fact that your own closure based
++ object can even be done is a testament to that.
Just because it's flexible doesn't mean it isn't a hack.
C is flexible too - that doesn't mean I'd like to use it.
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())))))))))))))))))))))))
------------------------------
Date: Wed, 07 Oct 1998 20:25:54 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Syntax Question (What the 'ell does that mean?!)
Message-Id: <Pine.GSO.4.02A.9810071319170.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, Omri Mezrich wrote:
> $header =~ s/\n\s+/ /g; # fix continuation lines
> %hdrs = (UNIX_FROM => split /^(.*?):\s*/m, $header);
>
> It's supposed to split the entire header of a normal Unix email
> message (in $header) into fields and their values.
>
> Explain.
The explanation is that some people don't like to use well-written,
standard, well-tested, robust code from a module and prefer instead to
copy a few lines of undocumented, unreliable, and confusing code from one
program to another.
Maybe you want to get a module from CPAN to do this. Or maybe you want to
read perlop, perlre, and perlfunc, and maybe the RFCs about mail headers,
to see how that code does what it (purportedly) does. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 07 Oct 1998 15:08:13 -0400
From: Lance Juno <LLJ001@email.mot.com>
Subject: talking to myself (pg 343 camel book [2nd edition])
Message-Id: <361BBC1D.33F5AAB7@email.mot.com>
I've recently installed 'perl5_00402-bindist04-bc.zip' on my NT and have
recreated the script shown on page 343 of the camel book (2nd edition).
Problem is that the forking does not work. From the line:
$pid = open(KID_TO_WRITE, "|-");
I get, '$pid' equals 1 and the following error message gets generated:
The name specified is not recognized as an
internal or external command, operable program or batch file.
Question is, why doesn't this work for me? I get the same behavior when
I try to use 'fork()' (as in other numerous examples).
lj
--
Lance Juno <ljuno@nabu.isg.mot.com>
Motorola ING, 400 Matheson Blvd. W., Mississauga, ON L5R 3M1
Voice: 905 507-7321 Fax: 905 507-7280
Remember: If you drive, don't drink!
http://www.hurontario.net/~lrj/drive
------------------------------
Date: Wed, 07 Oct 1998 20:49:31 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Timing An LWP get request
Message-Id: <Pine.GSO.4.02A.9810071349030.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, Larry Rosler wrote:
> This FAQ says to use the 'alarm' unction. What does one do using a
> system that does not have 'alarm' implemented?
Install Linux. :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 07 Oct 1998 14:42:54 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: What does $INPUT{'name'} =~ s/\s+$//; do?? (I'm a newbie)
Message-Id: <x3yaf38qklt.fsf@tigre.matrox.com>
"Commitman" <commitman@digitalnet.com.br> writes:
>
> It will erase the all the ocurrence of \s+$ ( +$) of the $INPUT{ 'name'}
>
> If u speak portuguese u may access www.digitalnet.com.br/clientes/lammertech
> and look at "Tutoriais"
Then I suggest that you yourself go ahead and take a look at that
tutorial. '$' in a regexp means end of string.
--
Ala Qumsieh | No .. not Just Another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3921
**************************************