[18084] in Perl-Users-Digest
Perl-Users Digest, Issue: 244 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 8 14:10:48 2001
Date: Thu, 8 Feb 2001 11:10:34 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <981659433-v10-i244@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 8 Feb 2001 Volume: 10 Number: 244
Today's topics:
Re: How to get data from HTML to PERL? <tore@extend.no>
how to prevent Browser from loading a page from cache? <hou2@hotmail.com>
Re: Is scalar a float, int or string? <thoren@southern-division.com>
Re: Is scalar a float, int or string? <joe+usenet@sunstarsys.com>
Re: Is scalar a float, int or string? <ren.maddox@tivoli.com>
Re: Learning Perl <tore@extend.no>
Re: Learning Perl <fty@mediapulse.com>
Re: Learning Perl <jhall@ifxonline.com>
localization of perl-based CGI apps? dimus63@my-deja.com
Re: LWP::Simple issue? (Peter L. Berghold)
Re: Mailtools-1.15 confusing to me. pointers, please? <jbroz@transarc.ibm.com>
MP3 metainfo from filename <bjoern@hoehrmann.de>
Re: MP3 metainfo from filename <elijah@workspot.net>
Re: MP3 metainfo from filename <bjoern@hoehrmann.de>
Re: multipart/form-data upload troubles (Apache, CGI.pm <idontreadthis56@hotmail.com>
Re: Need a email perl/cgi script (Peter L. Berghold)
Re: Need Help Checking IP Address Syntax w/ PERL? <mischief@velma.motion.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 8 Feb 2001 19:05:38 +0100
From: Tore Aursand <tore@extend.no>
Subject: Re: How to get data from HTML to PERL?
Message-Id: <MPG.14ecfe5cfce2924798989a@news.online.no>
In article <95tmjk$7t6$1@nnrp1.deja.com>, jedialf@my-deja.com says...
> BUT I do not want to have HTML codes in PERL program...which means
> the PERL program has to read data from HTML file.
You mean like a template? Go to www.cpan.org and look for one of the
template modules.
--
Tore Aursand - tore@extend.no - http://www.extend.no/~tore/
------------------------------
Date: Thu, 8 Feb 2001 13:50:17 -0500
From: "Pidge66" <hou2@hotmail.com>
Subject: how to prevent Browser from loading a page from cache?
Message-Id: <3a82e97b$0$15967@wodc7nh6.news.uu.net>
My perl script updates a HTML document. How can I make the browser load the
new document instead of from its cache? I have a interim page which
indicates that changes have been made and to click OK to go to the new page.
------------------------------
Date: Thu, 8 Feb 2001 16:05:47 +0100
From: Thoren Johne <thoren@southern-division.com>
Subject: Re: Is scalar a float, int or string?
Message-Id: <MPG.14ecd409f5c3cd3898985f@news.btx.dtag.de>
In article <slrn9812vp.g7d.abigail@tsathoggua.rlyeh.net>, Abigail aka
abigail@foad.org says...
> In .sig, one that use computed goto, eval, self modifying code, POD,
> a loop with only unconditional jumps (but it terminates anyway),
> it's strict and -w clean, and fits in 1 line of 80 characters.
>
> perl -Mstrict -we '$_ = "goto F.print chop;\n=rekcaH lreP rehtona tsuJ";F1:eval'
i still have no idea why it terminates, and why '=' is not the last
printed character. some 'mystical' POD related i guess.
is it explained somewhere?
--
# Thoren Johne - 8#X - thoren@southern-division.com
# Southern Division Classic Bikes - www.southern-division.com
END{*5=sub{(print'J')+goto&{$=+=2}},$==3,*7=sub{(print'A')-goto&{$=+=4}},
*11=sub{(print'PH 8#X')*goto&{$=+=2}}=>$==42=>*13=sub{42}=>goto&{$=-=37}}
------------------------------
Date: 08 Feb 2001 13:10:40 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Is scalar a float, int or string?
Message-Id: <m3zofxoxjz.fsf@mumonkan.sunstarsys.com>
Thoren Johne <thoren@southern-division.com> writes:
> i still have no idea why it terminates, and why '=' is not the last
> printed character. some 'mystical' POD related i guess.
>
> is it explained somewhere?
How about a hint:
stick a "print $@" statement in there somewhere.
Here's my first crack at writing one of these little puzzles.
No hints for the one below, but you probably need to close stderr :)
As always, comments are welcome.
Joe Schaefer
--
$.=$[|3*rand;$_=67014523;END{print@_};*UNIVERSAL::AUTOLOAD=sub{&A;pop->();++
$#;*A};$.++,*[=*]=*\=sub{$].=pop.(--$#%2?q: ::qq::)};*#=sub{split m, (?<=^.{2})
(.{$.}),x,shift};@#=qw[just another Perl hacker];*A=*AUTOLOAD=sub{split"::",$A;
&]};map{splice@#,$_,1,&#($#[$_])}3,1;$_="@{[@#[m$.$g]]}";s;P;,p;;eval;$\.="\n"
------------------------------
Date: 08 Feb 2001 10:07:04 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: Is scalar a float, int or string?
Message-Id: <m3elx9upjr.fsf@dhcp11-177.support.tivoli.com>
Eli the Bearded <elijah@workspot.net> writes:
> And <aradia@user2.teleport.com> has this very interesting one:
>
> $j=\$j;{$_=unpack(P25,pack(L,$j));/Just Another Perl Wannabe/?print:$j++&&redo}
>
> That that even works is fairly surprising to me. Playing around with
> that, trying to make it shorter I had perl core dump on me several
> times. Not bad for portable one liner.
An obvious way to shorten it is:
$j=\$j;{$_=unpack P25,pack L,$j++;/Just Another Perl Wannabe/?print:redo}
This one is one character longer, but I like that it avoids assigning
to $_:
$j=\$j;{unpack(P26,pack L,$j++)=~/Just Another Perl Wannabe/?print$&:redo}
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Thu, 8 Feb 2001 16:28:47 +0100
From: Tore Aursand <tore@extend.no>
Subject: Re: Learning Perl
Message-Id: <MPG.14ecd99fe59059f2989899@news.online.no>
In article <95trlb$bdb$1@nnrp1.deja.com>, carryg@my-deja.com says...
> Can someone advise me, where can I learn Perl on the web? I have
> never used it before, but due to my work commitments, I feel I need to
> know how to use it. Many thanks Caroline
<URL:www.perl.com> has a tutorial going right now.
--
Tore Aursand - tore@extend.no - http://www.extend.no/~tore/
------------------------------
Date: Thu, 08 Feb 2001 16:08:16 GMT
From: "Jay Flaherty" <fty@mediapulse.com>
Subject: Re: Learning Perl
Message-Id: <Qvzg6.175167$I9.10661090@news5.aus1.giganews.com>
<carryg@my-deja.com> wrote in message news:95trlb$bdb$1@nnrp1.deja.com...
> Can someone advise me, where can I learn Perl on the web? I have
> never used it before, but due to my work commitments, I feel I need to
> know how to use it. Many thanks Caroline
>
>
> Sent via Deja.com
> http://www.deja.com/
I notice you use deja.com to post. Have you thought of using thier search
tool? Something tells me this is probably one of the most common (if not the
most common) question in the c.l.p.* NG's
jay
------------------------------
Date: Thu, 08 Feb 2001 17:54:13 GMT
From: "John Hall" <jhall@ifxonline.com>
Subject: Re: Learning Perl
Message-Id: <93Bg6.41313$E6.1019370@news1.rdc1.sdca.home.com>
I am new to perl as well, and the best resource I found was a plain english
tutorial for entry level programmers:
http://www.perl.com/pub/2000/10/begperl1.html
Go through the first 4 and make sure you understand every line. It takes
longer, but by the end you'll have a really good starting point.
<carryg@my-deja.com> wrote in message news:95trlb$bdb$1@nnrp1.deja.com...
> Can someone advise me, where can I learn Perl on the web? I have
> never used it before, but due to my work commitments, I feel I need to
> know how to use it. Many thanks Caroline
>
>
> Sent via Deja.com
> http://www.deja.com/
------------------------------
Date: Thu, 08 Feb 2001 15:56:18 GMT
From: dimus63@my-deja.com
Subject: localization of perl-based CGI apps?
Message-Id: <95ufis$s3j$1@nnrp1.deja.com>
Hi everyone,
Can you advise what is the "right" way to
simplify translations of a CGI application to
other languages without making its distribution
over complicated?
TIA,
Dmitry Mozzherin,
SUNY at Stony Brook, NY
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 08 Feb 2001 16:43:17 GMT
From: peter@uboat.berghold.net (Peter L. Berghold)
Subject: Re: LWP::Simple issue?
Message-Id: <slrn985j55.q1g.peter@uboat.berghold.net>
On Wed, 07 Feb 2001 12:01:56 -0800,
Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
>> foreach my $site(@sitelist){
>> printf "Gloming site: %s ... ";
>> my $content = get($site);
>> carp 'Nothing retrieved from ' . $site . "\n" unless $content;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What's this?
>How do you know nothing is being returned? There
>is no print command nor any apparent device to
When the program runs A) the carp message comes out and B) the rest of
the processing of the content gets skipped.
You're right in that I did not implicitly show a print of $content
in my code sniglet, but rest assured I put a print in there while I
did my initial troubleshooting.
Bottom line is this: $content is blank when get($site) returns and I'm
trying to figure out why. If I do a lwp -source on the site I get the
RSS file that I was after. In fact, for now that is how I'm getting
the RSS files until I can figure out why LWP::Simple::get isn't working.
--
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold Peter@Berghold.Net
"Linux renders ships http://www.berghold.net
NT renders ships useless...."
------------------------------
Date: Thu, 08 Feb 2001 16:13:21 +0000
From: Joe Broz <jbroz@transarc.ibm.com>
Subject: Re: Mailtools-1.15 confusing to me. pointers, please?
Message-Id: <3A82C5A1.BF3CED9C@transarc.ibm.com>
The WebDragon wrote:
>
> I downloaded MailTools-1.15 on the recommendaton of someone here
> (thanks!) and it looks like it'll be what I need to do the following:
[ ... ]
> does anyone have a simple example or two that use the MailTools
> module(s) to do a simple SMTP type mailing that I can adapt to the
> following criteria on my own:
Search the web. There are many examples to be found. I won't point out any
URLs because I don't have them here but they are trivial to find.
------------------------------
Date: Thu, 08 Feb 2001 18:40:25 +0100
From: Bjoern Hoehrmann <bjoern@hoehrmann.de>
Subject: MP3 metainfo from filename
Message-Id: <3aa2d92a.22719619@news.bjoern.hoehrmann.de>
Hi,
Is there any module or some code available to get some meta information
(commonly artist, title, album, track number) of MP3 files using their
filename? Some heuristic analysis would be great, since there are a lot
of naming conventions...
TIA,
--
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981028 ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote [!]e
~~ will code for food. ~~
------------------------------
Date: 8 Feb 2001 18:15:32 GMT
From: Eli the Bearded <elijah@workspot.net>
Subject: Re: MP3 metainfo from filename
Message-Id: <eli$0102081313@qz.little-neck.ny.us>
In comp.lang.perl.misc, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> Is there any module or some code available to get some meta information
> (commonly artist, title, album, track number) of MP3 files using their
> filename? Some heuristic analysis would be great, since there are a lot
> of naming conventions...
There are modules for reading tags out of MP3 files. I don't
think there is any module to parse arbitrary MP3 filenames into
that data (artist, title, album, track number). It could get
pretty tricky.
If you are on a Windows box, try the auto-tagger of QCD. It
uses CDDB to do the identification. (The CDDB module at CPAN
is not powerful enough for that.)
<URL:http://www.quinnware.com/>
Elijah
------
made a skin for QCD2 once
------------------------------
Date: Thu, 08 Feb 2001 19:54:45 +0100
From: Bjoern Hoehrmann <bjoern@hoehrmann.de>
Subject: Re: MP3 metainfo from filename
Message-Id: <3aa6eb0f.27300045@news.bjoern.hoehrmann.de>
* Eli the Bearded wrote in comp.lang.perl.misc:
>There are modules for reading tags out of MP3 files. I don't
>think there is any module to parse arbitrary MP3 filenames into
>that data (artist, title, album, track number). It could get
>pretty tricky.
Yes...
>If you are on a Windows box, try the auto-tagger of QCD. It
>uses CDDB to do the identification.
I'd like to know how you think this would work. It should be rather hard
to get information out of the CDDB database without knowing at least
artist and title or the CDDBID.
--
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981028 ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote [!]e
~~ will code for food. ~~
------------------------------
Date: Thu, 08 Feb 2001 11:06:15 -0600
From: Keep it to Usenet please <idontreadthis56@hotmail.com>
Subject: Re: multipart/form-data upload troubles (Apache, CGI.pm)
Message-Id: <idontreadthis56-CB2D8F.11061508022001@[216.227.56.89]>
In article <slrn983uuo.bdg.efflandt@efflandt.xnet.com>,
efflandt@xnet.com wrote:
> On Wed, 07 Feb 2001, name too long <idontreadthis56@hotmail.com> wrote:
> >{Pardon if this is a dup, I can't find my post anywhere.}
>
> Well you cross posted to 2 groups here, but also posted it separately to
Yeah, I forgot that one of the groups I posted to was moderated, so I
split the cross-post down. As soon as I realized why my post never
appeared, I couldn't believe I made the mistake. Thanks.
> the cgi newsgroup where it belongs. I gave you a suggestion there.
I'm so stumped, I wasn't sure if my problems were Perl, CGI.pm or
server based.
--
Help! I'm being held in a .sig factory.
------------------------------
Date: Thu, 08 Feb 2001 16:45:43 GMT
From: peter@uboat.berghold.net (Peter L. Berghold)
Subject: Re: Need a email perl/cgi script
Message-Id: <slrn985j9n.q1g.peter@uboat.berghold.net>
On Sat, 3 Feb 2001 05:41:40 -0800, newuser <newuser@nospam.slip.net> wrote:
>Hello,
> I was just wondering if someone has a perl/cgi script that I can use
Do a search on the web for Perl CGI scripts and see if there is something
out there that comes close to what you want to do and modify it to fit.
You are asking for a lot though....
--
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold Peter@Berghold.Net
"Linux renders ships http://www.berghold.net
NT renders ships useless...."
------------------------------
Date: Thu, 08 Feb 2001 16:41:28 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Need Help Checking IP Address Syntax w/ PERL?
Message-Id: <t85j1ob803qm99@corp.supernews.com>
Peter J. Acklam <jacklam@math.uio.no> wrote:
> inwap@best.com (Joe Smith) writes:
>> Peter J. Acklam <jacklam@math.uio.no> wrote:
>>
>> > If you want a regex-only approach, you can use
>> >
>> > sub isip {
>> > local $_ = shift;
>> > / \A
>> > (?: [0-1]?[0-9]?[0-9] | 2[0-4][0-9] | 25[0-5] )
>> > (?: \. (?: [0-1]?[0-9]?[0-9] | 2[0-4][0-9] | 25[0-5] ) ) {3}
>> > \z
>> > /x;
>> > }
>>
>> I can "ping 192.18.25073" and I can "nslookup 192.18.25073" but
>> the above regex does not allow that IP address.
> Is it really an IP address? I thought an IP address was four
> numbers in the range 0..255, each separated by a dot...?
An IP address is actually a 32-bit binary value (under IPv4).
It can be represented many different ways, including some of
the oddball ones that have been mentioned.
What the OP wants, though, is something that checks the validity
of a dotted-decimal format IP representation. After seeing a bunch
of options, I like Damian Conway's.
Chris
--
Christopher E. Stith
Get real! This is a discussion group, not a helpdesk. You post
something, we discuss its implications. If the discussion happens to
answer a question you've asked, that's incidental. -- nobull, clp.misc
------------------------------
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 V10 Issue 244
**************************************