[8903] in Perl-Users-Digest
Perl-Users Digest, Issue: 2520 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 6 20:07:29 1998
Date: Wed, 6 May 98 17:00:36 -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, 6 May 1998 Volume: 8 Number: 2520
Today's topics:
Re: Adding 600 users to a Linux password file <ebohlman@netcom.com>
Re: cgi-lib (Martien Verbruggen)
Challange for perl `GURUS` <vgajjar@exodus.net>
Re: comp.lang.perl.misc (was Re: Credit Card Verificati tdohner@thq.com
Connecting to a share <angela_molnar@hp.com>
Re: COUNTING DAYS UNTIL 2000 (Wayne C. McCullough)
Re: COUNTING DAYS UNTIL 2000 (Martien Verbruggen)
Re: Date::Manip on NT <jdf@pobox.com>
Re: directorys and Files? <ebohlman@netcom.com>
Re: Ever Wonder Why Not Everyone Uses Modules? (Leslie Mikesell)
Re: Ever Wonder Why Not Everyone Uses Modules? (Craig Berry)
Re: Ever Wonder Why Not Everyone Uses Modules? (Stuart McDow)
Re: Ever Wonder Why Not Everyone Uses Modules? (Leslie Mikesell)
Re: Ever Wonder Why Not Everyone Uses Modules? (Leslie Mikesell)
Re: Ever Wonder Why Not Everyone Uses Modules? (Brett Tabke)
Re: Ever Wonder Why Not Everyone Uses Modules? (John Stanley)
Re: Ever Wonder Why Not Everyone Uses Modules? (Craig Berry)
Re: exists and -w messages <jdf@pobox.com>
Re: Help choosing names =~ Perl-SQL <glew@cs.wisc.edu>
Re: how do you do to extract the title of a .html docum (Philosopher King)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 6 May 1998 22:01:37 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Adding 600 users to a Linux password file
Message-Id: <ebohlmanEsK2Iq.DEv@netcom.com>
David Fetter <dfetter@shell4.ba.best.com> wrote:
: Perl4 has CERT warnings and published cracks out for it. Your ISP is
: subject to mitnickization and should get rid of it immediately.
You forgot to mention that there are no plans to make Perl4 Y2K-compliant.
------------------------------
Date: 6 May 1998 23:22:11 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: cgi-lib
Message-Id: <6iqrb3$fp1$4@comdyn.comdyn.com.au>
In article <6iorde$302$1@nnrp1.dejanews.com>,
trieu8@hotmail.com writes:
> Is there someone can help me?
Maybe
Please read the following:
Perl CGI FAQ and (no offense) Idiot's guide:
http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html
http://www.perl.com/CPAN/doc/FAQs/cgi/perl-cgi-faq.html
Section 9 of the perl FAQ:
# perldoc perlfaq9
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd. | enough features yet.
NSW, Australia |
------------------------------
Date: Wed, 06 May 1998 15:10:41 -0700
From: Vimal Gajjar <vgajjar@exodus.net>
Subject: Challange for perl `GURUS`
Message-Id: <3550DFE1.61460E61@exodus.net>
Hi there!
Here is a challange. Challange is to write a perl script
with has three input parameters.
challange.pl 10 5 2
which means this perl script should take 5 % of cpu 2 mb of RAM for 10
seconds.
-vimal
--
Vimal Gajjar
Software Engineer (R & D Div.)
Exodus Communications Inc.,
Voice : (408)346-2335
Pager : (408)994-2550
------------------------------
Date: Wed, 06 May 1998 17:36:53 -0600
From: tdohner@thq.com
Subject: Re: comp.lang.perl.misc (was Re: Credit Card Verification scripts?)
Message-Id: <6iqom5$9f2$1@nnrp1.dejanews.com>
> I think that more interesting discussions would start if we didn't have
> to wade through 200 posts a day asking "why won't my web page counter
> work?"
>
I think someone telling answering the original question with where to find th
e documentation would be more interesting than a load of posts berating them
and telling stupid jokes.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Wed, 06 May 1998 16:47:02 -0700
From: Angela Molnar <angela_molnar@hp.com>
Subject: Connecting to a share
Message-Id: <3550F676.409C@hp.com>
Hello,
Is there a way, using NT Perl, to connect to a share on another server,
either UNIX or NT, read a file, and close the share? A code example
would really be helpful.
Thanks,
Angela Molnar
Hewlett Packard
angela_molnar@hp.com
------------------------------
Date: 6 May 1998 22:00:33 GMT
From: wayne@Glue.umd.edu (Wayne C. McCullough)
Subject: Re: COUNTING DAYS UNTIL 2000
Message-Id: <6iqmi1$2id$2@hecate.umd.edu>
Mathijs Oosterom (thijs@esense.nl) wrote:
: Hi there,
: Does anyone has a Perl-script that counts the days until the year 2000?
: Or does anybody know how to do that? Is there a function that gives a value
: in days for each given date?
: Thanx in advance,
$days = int((946684800 - time)/86400) + 1;
Assuming that at Dec 31, 1999 23:59:59 there is still 1 day remaining.
It also finds the time based on Zulu. change the big number accordingly
if you want another time zone.
W
------------------------------
Date: 6 May 1998 23:17:51 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: COUNTING DAYS UNTIL 2000
Message-Id: <6iqr2v$fp1$2@comdyn.comdyn.com.au>
In article <35502186.5389@rl.ac.uk>,
Rosemary Powell <RIHPowell@rl.ac.uk> writes:
> Mathijs Oosterom wrote:
>> Does anyone has a Perl-script that counts the days until the year 2000?
> Well, I hate to say it in this group, but the much reviled Matt's
> script archives has a general countdown script, which will work for
> any given date.
Nice for Matt, but CPAN has Date::Manip, which also can do it, can do
lots more, and probably is a bit more robust.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Very funny Scotty, now beam down my
Commercial Dynamics Pty. Ltd. | clothes.
NSW, Australia |
------------------------------
Date: 06 May 1998 19:14:53 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: hjf@companyname1.com
Subject: Re: Date::Manip on NT
Message-Id: <somnlywy.fsf@mailhost.panix.com>
iug piug <hjf@companyname1.com> writes:
> I'm trying to use Date::Manip on a NT box. I include "use Manip;"
> (without quotes) because "use Date::Manip;" (without quotes) causes
> "Can't locate Date/Manip.pm..." to display.
If you set your kitchen on fire, and the smoke detector goes off, and
you're trying to take a nap, will you fix the problem by removing the
battery from the smoke detector?
> Any ideas as to what I'm doing wrong?
Yes. Perl can't find Date::Manip because you haven't installed it.
You'll find Date::Manip at the CPAN:
http://www.perl.com/CPAN-local/
You'll find instructions for installing it in the readme that comes
with it. You might also consult perlfaq8, which deals with modules.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf/
------------------------------
Date: Wed, 6 May 1998 22:36:57 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: directorys and Files?
Message-Id: <ebohlmanEsK45L.Ftt@netcom.com>
Frank L. Quednau <quednauf@nortel.co.uk> wrote:
: Hi, is this actually an automated response? 'cos the answer is actually shorter
: than what you have written ;)
: opendir(CB,"$filebase") || die "Cannot opendir:$!";
: foreach $file (sort readdir(CB)) {
: push (@files, $file);
: }
Did Perl's operators recently unionize and demand that some
"featherbedding" work rules be written into their contract? In the above
code, you create an anonymous array containing the directory entries,
sort it into another anonymous array, and then walk through that second
array an element at a time, putting them into yet another (this time
non-anonymous) array that eventually winds up being identical to the
second anonymous array. Sounds like a rather unproductive duplication of
effort.
------------------------------
Date: 6 May 1998 17:32:24 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iqodo$gt9$1@Jupiter.Mcs.Net>
In article <86d8ds76v5.fsf@gwaihir.ethz.ch>,
Matthias Neeracher <neeri@iis.ee.ethz.ch> wrote:
>
>> it might not be up when you try to send your mail (intermittent connections
>> never happen, right?). Are you ready to setup your own local message que and
>> daemon to handle it? If you simply pipe to sendmail you'll get delivered in
>> the best possible way, automatically qued if needed, and a host of other
>> features and fall backs you're just not going to get with SNTP, ever.
>
>You are right that there are tradeoffs involved: With Net::SMTP you get to
>pick your mail server of choice, get more immediate feedback about errors that
>occur, but may have to face complex fallback strategies if the network between
>you and your server fails. With sendmail, you are at the mercy of the sendmail
>setup on the local host (sendmail never gets misconfigured, right?), but if
>that setup is correct, you get best efforts delivery.
Lots of places have firewalls in place that block outbound SMTP
from random internal machines (it is rather impolite to send things
from hosts that won't accept inbound connections). In this case
you must relay through your designated mailhub which will also take
care of queuing/retries for you. Sendmail may already be configured
for this and there isn't a handy way to figure it out automatically.
I use CNAMEs for smtphost and mailhost pointing to the right place
but that is just a convention.
Les Mikesell
les@mcs.com
------------------------------
Date: 6 May 1998 22:45:12 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iqp5o$g0p$1@marina.cinenet.net>
Andy Armstrong (andy@wonderworks.co.uk) wrote:
: In article <Pine.GSO.3.95.980506131430.23850A-
: 100000@hollywood.cinenet.net>, Craig Berry <cberry@cinenet.net> writes
: >[courtesy cc of this posting sent to cited author via email]
: >On Wed, 6 May 1998, Tom Christiansen wrote:
: >> In comp.lang.perl.misc, cberry@cinenet.net (Craig Berry) writes:
: >> :I can't use it (for example) on my old brain-dead DOS box, where I do a
: >> :good deal of Perl development.
: >>
: >> Whose fault is that one, again?
: >
: >OK, before I go ballistic, let me take several deep breaths and ask what
: >you are refering to by 'that'.
:
: Why would you go ballistic? Perl is free and the source is available. If
: it doesn't support your preferred platform why not port it? If you're
: not prepared to do that who do you expect to do it for you?
I'm *not* going ballistic about Perl or CPAN. I love Perl, and have it
installed on every machine I use, at home or at work (this spans Win3.1,
WinNT, and Solaris, btw). I love CPAN, with the reservations I've
expressed in this thread and elsewhere. My anger was directed at Tom,
pending his clarification, with reference to his insinuation that it's "my
fault" that I can't use CPAN.pm as a panacea, since I do some of my work
on a less-capable, non-Unix-like machine. Only that, and nothing more, to
quote Poe.
[mega-snip]
: Get real. Maybe you'd like some cash with your free software?
I hope I've clarified my position enough that you'll understand the
irrelevance of this comment. I greatly appreciate the generosity of the
Perl community, and try to contribute to it in my own small way by (e.g.)
answering questions on this newsgroup rather frequently. My *only*
quarrel is with Tom C.'s attitude in his 'whose fault is that' post.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: 6 May 1998 22:49:54 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iqpei$s15$1@ns1.arlut.utexas.edu>
Art Cohen <upsetter@shore.net> writes:
>
> ... if everybody used Unix for everything there'd be no problem ...
Agreed.
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"It is obvious that about 750,000 people ago, Austin was a wonderful City."
------------------------------
Date: 6 May 1998 18:02:00 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iqq58$h66$1@Jupiter.Mcs.Net>
In article <gburnoreEsK15D.FE0@netcom.com>,
Gary L. Burnore <gburnore@netcom.com> wrote:
>
>Emailing when posting is oine of the rudest things you can do. It IS
>like being spammed "or something". If you email, don't post. If you
>post, don't email. Unless of course it's REQUESTED of you. Just because
>you like to do it or "usually" do it, doesn't make it right.
You are speaking only for yourself here. I happen to like a curtesy
copy.
>Telling someone to "quit whining" when they mention they'd rather not
>receive email from you when you post is simply stupid.
Huh? If you don't want replies, why post anything with your return
address on it? It is nicer if the cc: mentions that it is a copy
of a posting, though.
Les Mikesell
les@mcs.com
------------------------------
Date: 6 May 1998 18:30:39 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iqrqv$hbi$1@Jupiter.Mcs.Net>
In article <Pine.GSO.3.95.980506131430.23850A-100000@hollywood.cinenet.net>,
Craig Berry <cberry@cinenet.net> wrote:
>
>Whose fault is it that I do a good deal of Perl development on a Win3.1
>486 box? My own, I guess...I really should've sunk a few thousand dollars
>into upgrading my hardware, rather than putting food on the table and
>caring for sick family members. My mistake. But the money I'm making off
>my after-hours Perl work is going into the upgrade fund (some of it,
>anyway), so I can stop offending the Perl Gods with my loathesome and
>inadequate system.
Why not drop Linux or Freebsd into the 486?
Les Mikesell
les@mcs.com
------------------------------
Date: Wed, 06 May 1998 17:25:16 -0500
From: phdss@writeme.comm (Brett Tabke)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <MNOU1IIelYrK092yn@netins.net>
Paolo Ciccone <p-ciccone@usa.net> wrote:
>>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
>
>[a lot of stuff deleted]
>
> TC> You are insane. Please go fetch a document by URL, including
> TC> redirect handling, and then parse the HTML by yourself into a
> TC> tree structure that you can traverse for modification. Go
> TC> ahead. You're a programmer, after all.
>
>Tom, isn't ironic how greedy and spoiled people are ? You write your
>stuff for free, you documente it and post on the net. You prepare a
>great Web site and support all kind of newbies repeating over and over
>the same answers. But they still complain. Better laugh at this
>otherwise you loose faith in the human race :)
How is encouraging people to write there own programs greedy or
in any way spoiled?
If the answer to every question becomes "just use module X" then we
are turning Perl from programming community into a simple user base.
(which is already happening).
If you think that the answer to every question is "use a module"
then your dream for the next version Perl must be:
Just package the entire CPAN subsystem in with the mainline
distribution. Or better yet, how about a nice pretty little
interface to CPAN right on the desktop:
"Need to parse html? CLICK HERE!"
"Need to stellar cartography data? CLICK HERE!"
"Need to spider a url and build a tree? CLICK HERE!"
and transparently behind the scenes Perl pulls down it down from
CPAN and writes a cute little progy out of precanned routines -
Of course to keep perl free, there will be a couple pretty little
advertisements attached to each access. (Gosh, Sound familiar? it
is also know as: Win98)
If you agree with that, then your idea of Perl is not of programming
language, but a high frills batch language. If that is what you
want from Perl, you probably have the wrong group, your looking for
the windows visual basic group.
Look, I am just trying to fight a little for the future of Perl and
its vast diversity. If we all do things the exact same way with the
exact same routines, then we need to make it official and rename the
group to "perl.help.desk-its.been.written-just.use.a.module". I
don't want that to happen and I don't think you do either.
>I had so much work done because of the generosity of the Perl
>community that I can't possibly immagine somebody complaining about
>CPAN or the quality of the modules.
I agree that CPAN is a good setup and the potential chaos of it all
is well in check.
Disagreeing with the way a module is implemented or the methodology
to carry the task, is far different from criticizing the quality of
the programming. To use a set of routines to study and learn from,
is one of the highest compliments you can pay a programmer.
-bt
--
-- Brett Tabke (phdss at writeme.com) www.netins.net/showcase/phdss/
...When trying to locate something, search your mind first. -plato
------------------------------
Date: 6 May 1998 23:42:17 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iqsgp$fc6$1@news.NERO.NET>
In article <6iqodo$gt9$1@Jupiter.Mcs.Net>, Leslie Mikesell <les@MCS.COM> wrote:
>In article <86d8ds76v5.fsf@gwaihir.ethz.ch>,
>Matthias Neeracher <neeri@iis.ee.ethz.ch> wrote:
>>You are right that there are tradeoffs involved: With Net::SMTP you get to
>>pick your mail server of choice, get more immediate feedback about errors that
>>occur, but may have to face complex fallback strategies if the network between
>>you and your server fails. With sendmail, you are at the mercy of the sendmail
>>setup on the local host (sendmail never gets misconfigured, right?), but if
>>that setup is correct, you get best efforts delivery.
I trust the sendmail configuration on my systems more than I trust the
sendmail configurations on arbitrary outside systems.
>Lots of places have firewalls in place that block outbound SMTP
>from random internal machines (it is rather impolite to send things
>from hosts that won't accept inbound connections).
Where did this gem come from? It certainly is not impolite to do this.
It's "best practice" to protect systems that have no need to accept
sendmail connections from the ruffians who would try to use one to break
in or attempt a DOS attack.
As for your question why someone who doesn't want email replies would
post something with his email address in it -- I think the excuse is
"the RFC requires it". At least that is the argument against munging
addresses.
------------------------------
Date: 6 May 1998 23:47:38 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iqsqq$g0p$2@marina.cinenet.net>
Leslie Mikesell (les@MCS.COM) wrote:
: Why not drop Linux or Freebsd into the 486?
I'm strongly considering doing just that. There are some trade-offs
involved, including the effort/complexity required to do so vs. the
odds of getting a better system soon enough to make it more efficient
to wait and do so there. But I am aware it would solve a few of my
problems (while no doubt replacing them with refreshing new ones :) ).
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: 06 May 1998 18:52:54 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: wayne@Glue.umd.edu (Wayne C. McCullough)
Subject: Re: exists and -w messages
Message-Id: <vhrjlzxl.fsf@mailhost.panix.com>
wayne@Glue.umd.edu (Wayne C. McCullough) writes:
> I mean, I am checking, not useing the value, just to make sure I
> don't get an error later, so why bitch when I check?
How can we help you if you don't post any code?
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf/
------------------------------
Date: Wed, 06 May 1998 17:21:19 -0500
From: Andy Glew <glew@cs.wisc.edu>
To: steve.tolkin@fmr.com, glew@cs.wisc.edu
Subject: Re: Help choosing names =~ Perl-SQL
Message-Id: <3550E25F.A98E3136@cs.wisc.edu>
> I agree you should support both of these formats,but think they should be redesigned to
> use othogonal features. I want to have individual values enclosed in quotation marks
> (to allow any character to occur) while still having a multiline format.
That happens. In the multiline nested tuple format you can use whatever syntaxes Perl supports:quotes, numbers, hashes, arrays,
whatever.
> You might want to support two different types of enclosed values:
> one where internal quotation marks are doubled, as in CSV, and one where they
> are escaped with a backslash, as in Perl.
I think that you are referring to SQL like quote syntax, as inSQL: 'this is a string with a single quote '' embedded'
Perl: 'this is a string with a single quote \' embedded'
Want it. Just lower priority.
> To save space I want multiple named values to appear on one line.
Already supported by the MNT format.The only constraint on MNT format is that the opening and closing
brace must both begin in column 1, and all other braces internal to a tuple
must be indented. Everything between the braces is evalled.
> I also want to be able to have comments at the end of data lines.
Comments can be embedded almost anywhere.In SNT and MNT, use Perl-like # to end of line comments.
In the SDR (singleline delimited records) format,
nearly any comment delimiter (#, !, :, etc.) can be used.
> > Yes: currently I just eval the MNT format as a Perl expression.
>
> If you are parsing CSV you should be able to parse these too, ratherthan having perl parse
> them
I started out doing that. It quickly became a pain, especially since I wanted to support nested
data structures - fields whose values are arrays, hashes, etc. - as well as function syntax
for field values. Perl evals give me all of that for free.
I don't like the security concerns of evalling, however, and may yet write my own parser.
Especially since I want to handle BiBTeX like records.
Also, I would like to permit cyclic data structures to be created. My idea as to how to do
this in a single statement would probably also be a good idea in Perl.
Basically, I want to allow labels within the complex data structure syntax.
E.g.
{
circular_list => label: [ { value => 12, list => [ 1,2] }, {value => 666, list => label} ],
}
I suppose that this is actually similar to saying
circular_list => ($label = [ ....] ),
(but then, if this works, why doesn't data dumper use the syntax?)
I am also a big fan of Donald Knuth's relative notation for labels in this regard:
1H:, 1B, 1F.
> > Perl-SQL supports SQL aggregate functions, such as SUM, AVG, etc.
> > It allows you to do things like
> > SELECT address, count/SUM(count) AS "%age" FROM "database.mnt"
>
> This is very useful -- but do you allow the equivalent of the SQL group by?
Not yet....
(To be perfectly honest, I regard 'GROUP BY' as a kluge, for what really should
be a relation consisting of other relations. I.e. I don't want to implement GROUP BY
until I have the object relational stuff, at which time GROUP BY is just syntactic
sugar.)
> > Perl-SQL currently only supports sorted equijoins.
>
> This seems somewhat odd given how well perl handles hashes.Perhaps look at the Set module
> for efficient ways to do set operations using hashes.
Problem is that I need to use datasets that are too large to fit in virtual memory.I don't think that the Set module does external
operations.
> > multiline_named_tuples.pm
> > singleline_named_tuples.pm
> > singleline_delimited_records.pm
> > methods for the various types of
> > databases implemented
> > by plain_text_database.pm
>
> Either use tuples or records in all all places. I prefer records,especially since you
> support "variant" records.
I agree with most of your naming suggestions, but differ on this.I want to use records/tuples to empahsize the difference between
'Records', which implies a physicalfixed format, and the more abstract notion of tuples whose components have names. In fact,
if I could figure out a way to have both named and unnamed components in tuples, I would.
----
Thanks for the suggestions.
------------------------------
Date: Wed, 06 May 1998 22:09:52 GMT
From: holcojh5@REMOVEMEwfu.edu (Philosopher King)
Subject: Re: how do you do to extract the title of a .html document?
Message-Id: <3550db81.160193385@enews.newsguy.com>
On Wed, 6 May 1998 10:42:01 -0700, "Larry Rosler" <lr@hpl.hp.com>
wrote:
>[posted and mailed]
>
>Philosopher King wrote in message
><3550901b.140891260@enews.newsguy.com>...
>...
>>if (/<title>(.*)<\/title>/i) {
>> print $1;
>> # or whatever else you want to do with it
>>}
>...
>
>Why assume the title is on one line? Also, what if there is more than
>one title (I know, there shouldn't be!)?
>
>if (/<title>(.*?)<\/title>/is) {
> ^ ^
That's true, but those are both problems that can be fixed using out
of the box Perl regular expressions and fairly simple language
constructs (without installing a separate module). I would agree that
installing the module would be the most elegant way to do this, but I
hate to suggest that for something this simple because sometimes it
isn't possible for various reasons. I probably should have posted
something a bit longer, but I was in a rush this morning. I apologize.
Later...
Heath
--
Heath Holcomb * I want to be more like the ocean
holcojh5@REMOVEMEwfu.edu * No talking, man...
holcomb@REMOVEMEmthcsc.wfu.edu * All action
http://www.wfu.edu/~holcojh5/ * - Perry Farrell
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 2520
**************************************