[16219] in Perl-Users-Digest
Perl-Users Digest, Issue: 3631 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 12 00:05:44 2000
Date: Tue, 11 Jul 2000 21:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963374710-v9-i3631@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 11 Jul 2000 Volume: 9 Number: 3631
Today's topics:
"VALUE" of web form fields stops at spaces? aaronmolnar@my-deja.com
Re: "VALUE" of web form fields stops at spaces? (Eric Bohlman)
Re: <newbie>How to determine current location (pwd) in <peter.sundstrom@eds.com>
An unquoted string error (Mike)
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <wyzelli@yahoo.com>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! (Brandon Metcalf)
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <care227@attglobal.net>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <tony_curtis32@yahoo.com>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! (Steven Smolinski)
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <DNess@Home.Com>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <uri@sysarch.com>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <care227@attglobal.net>
Re: CGI-to-NT service communication..... <ha@linux1.org>
Re: DBI->connect question <rereidy@indra.com>
Re: DBI->connect question <bwalton@rochester.rr.com>
Re: easy one for xperienced users.. hard for me... <bwalton@rochester.rr.com>
How can I use HTML::Parser to get images from HTML file salvadorej@my-deja.com
Re: How can I use HTML::Parser to get images from HTML (Randal L. Schwartz)
Re: How can I use HTML::Parser to get images from HTML <bwalton@rochester.rr.com>
how to make my program with csh (doco)
Re: how to make my program with csh <care227@attglobal.net>
Re: Is there a way to make a perl script into an execut <care227@attglobal.net>
Re: Is this an application for PERL?? <care227@attglobal.net>
Re: Is this an application for PERL?? <peter.sundstrom@eds.com>
Re: Printing web pages <tony_curtis32@yahoo.com>
Re: running system command as root from perl ynotssor@my-deja.com
Re: stupid perl question <eprom007@hotmail.com>
Re: Welcome to.... salvadorej@my-deja.com
Re: Which one is better? $_[0] or shift? (Abigail)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 12 Jul 2000 03:18:55 GMT
From: aaronmolnar@my-deja.com
Subject: "VALUE" of web form fields stops at spaces?
Message-Id: <8kgo2j$nac$1@nnrp1.deja.com>
I'm using PERL to retrieve user info so that the user can change
it and submit it for update. When I use a scalar as the value in
one of the form fields only the first word gets displayed.
ex: $user_name eq "Joe Smith";
print "<input..... value=$user_name>";
This only inserts "Joe" into the web field instead of "Joe Smith".
Has anyone else had a similar problem? What can I do?
Thanks a lot for any help.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 12 Jul 2000 03:46:38 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: "VALUE" of web form fields stops at spaces?
Message-Id: <8kgpmu$phj$2@slb6.atl.mindspring.net>
aaronmolnar@my-deja.com wrote:
: I'm using PERL to retrieve user info so that the user can change
: it and submit it for update. When I use a scalar as the value in
: one of the form fields only the first word gets displayed.
:
: ex: $user_name eq "Joe Smith";
: print "<input..... value=$user_name>";
:
: This only inserts "Joe" into the web field instead of "Joe Smith".
You're generating bad HTML. Attribute values that contain spaces need to
be quoted.
------------------------------
Date: Wed, 12 Jul 2000 13:50:06 +1200
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: <newbie>How to determine current location (pwd) in CGIscript?</newbie>
Message-Id: <8kgiu3$p8n$1@hermes.nz.eds.com>
Jeff Susanj wrote in message ...
>This "Jeopardy Quoting" must be a perl thing because I have never heard
>anyone object to it in any other newsgroup. I really hate to wade through
a
>big long quote when I just read it in the last 10 replies. The quote is a
>reference that I can look at if I need it. Otherwise I know what the
thread
>is about. Worse, I hate to see someone blasted for something like that
>especially with no explanation (as I was in another Perl newsgroup that I
>never went back to).
>
>Peter Sundstrom wrote in message <8kdkko$f4m$1@hermes.nz.eds.com>...
You've also managed to attribute the last post to me, which is incorrect if
you used the headers correctly.
------------------------------
Date: 11 Jul 2000 21:37:49 -0700
From: tcsh@holly.colostate.edu (Mike)
Subject: An unquoted string error
Message-Id: <slrn8mnr9f.d5n.tcsh@localhost.localdomain>
I fail to understand why perl has trouble with the following :
#!/usr/local/bin/perl -w
use strict;
package cdssffffffff;
sub n {
}
package main;
my $j = cdssffffffff->n();
Yet, if I change cdssffffffff to cdssffffffff1, the following error message is
not longer produced :
Unquoted string "cdssffffffff" may clash with future reserved word at ./jjjj
line 9
perldiag says:
Unquoted string """"%s"""" may clash with future reserved word (W) You
used a bareword that might someday be claimed as a reserved word. It's best to
put such a word in quotes, or capitalize it somehow, or insert an underbar into
it. You might also declare it as a subroutine.
But, I can't really see cdssffffffff being a reserved word.. so what's the
deal? Changing -> to :: avoids the error too. I understand that -> simply
passes a ref to the object in, why would doing this cause the afformentioned
error?
Insight appreciated,
--
Mike
------------------------------
Date: Wed, 12 Jul 2000 10:36:23 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <%uPa5.6$Sm.1942@vic.nntp.telstra.net>
>
> It is always proper to be `proper'. However `proper case letters'
doesn't
> mean anything to me. If you mean `uppercase letters'
I would have take 'proper case letters' to mean the correct use of mixed
case (upper and lower) when starting sentences and for nouns etc. It is
reasonable to query uri, but then most of us have just learned to ignore
basic typo's and oddities and look for the Perls of wisdom.
Wyzelli
------------------------------
Date: 12 Jul 2000 00:50:06 GMT
From: bmetcalf@nortelnetworks.com (Brandon Metcalf)
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kgfbu$74i$1@bcrkh13.ca.nortel.com>
p3rlc0dr@my-deja.com writes:
> > Minor point of clarification: A good deal of the Perl code we all
> write
> > has nothing whatsoever to do with the web, although it is quite
> popular in
> > web-related work.
>
> I read a nice book of Matt Wright. Matt says Perl is the web code.
Isn't that nice. The majority of all Perl code written has nothing to
do with the web or cgi. I don't know the exact quote from Matt's book,
but you are misunderstanding what he meant.
Just because the statement 'orange is fruit' is true doesn't mean that
'fruit is orange' is true.
Brandon
------------------------------
Date: Tue, 11 Jul 2000 21:37:30 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <396BCBDA.599FEC1F@attglobal.net>
p3rlc0dr@my-deja.com wrote:
>
>
> I read a nice book of Matt Wright. Matt says Perl is the web code.
>
I do think this group is being trolled again...
------------------------------
Date: Wed, 12 Jul 2000 01:48:50 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kgipu$jkc$1@nnrp1.deja.com>
In article <8kge6e$6dp$1@bcrkh13.ca.nortel.com>,
bmetcalf@nortelnetworks.com wrote:
> p3rlc0dr@my-deja.com writes:
>
> > PS - Somone earlier here corected my words and spelling. Is it a
> > custom here to not use proper case letters?
>
> You were corrected on the use of PERL. There's no such thing as PERL.
I am know this. That is why I had asked about 'uri' and his proper
case. I was not understand.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
"There is no such thing as being a stupid woman."
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 01:55:36 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kgj6i$jon$1@nnrp1.deja.com>
In article <396BBFB5.F7F722B6@Home.Com>,
David Ness <DNess@Home.Com> wrote:
>
> deal of what I know from arrogant people. The first lesson I learned
as an
> MIT freshman was that I wasn't going to like everyone who happened to
know
The best and most smart of people are the quiet ones. Watch out for
them!
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
"There is no such thing as being a stupid woman."
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 02:04:54 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kgjnu$k4j$1@nnrp1.deja.com>
In article <%uPa5.6$Sm.1942@vic.nntp.telstra.net>,
"Wyzelli" <wyzelli@yahoo.com> wrote:
>
> I would have take 'proper case letters' to mean the correct use of
mixed
> case (upper and lower) when starting sentences and for nouns etc. It
is
> reasonable to query uri, but then most of us have just learned to
ignore
> basic typo's and oddities and look for the Perls of wisdom.
I have not been come across one 'Perl of wisdom' from 'uri'. How ever
I do like John Stanley. He is a very nice and helpful fellow.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
"There is no such thing as being a stupid woman."
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 02:19:11 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kgkij$krv$1@nnrp1.deja.com>
In article <8kgfbu$74i$1@bcrkh13.ca.nortel.com>,
bmetcalf@nortelnetworks.com wrote:
> p3rlc0dr@my-deja.com writes:
>
> >
> > I read a nice book of Matt Wright. Matt says Perl is the web code.
>
> Isn't that nice. The majority of all Perl code written has nothing to
> do with the web or cgi. I don't know the exact quote from Matt's
book,
> but you are misunderstanding what he meant.
Matt is nice. He explained me about localtime and 19100 and why
guestbook will do okay without file locking.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
"There is no such thing as being a stupid woman."
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 02:24:18 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kgks4$kv8$1@nnrp1.deja.com>
In article <396BCBDA.599FEC1F@attglobal.net>,
care227@attglobal.net wrote:
> p3rlc0dr@my-deja.com wrote:
> >
> >
> > I read a nice book of Matt Wright. Matt says Perl is the web code.
> >
>
> I do think this group is being trolled again...
>
I'm not understand troll Drew Simonis. Explan?
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
"There is no such thing as being a stupid woman."
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 11 Jul 2000 21:42:51 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <87puokvzkk.fsf@limey.hpcc.uh.edu>
>> On Wed, 12 Jul 2000 02:19:11 GMT,
>> p3rlc0dr@my-deja.com said:
> Matt is nice. He explained me about localtime and 19100
> and why guestbook will do okay without file locking.
Unfortunately,
nice != correct
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: Wed, 12 Jul 2000 02:43:06 GMT
From: sjs@yorku.ca (Steven Smolinski)
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <slrn8mnmq5.pm6.sjs@john.sympatico.ca>
p3rlc0dr@my-deja.com <p3rlc0dr@my-deja.com> wrote:
>I have not been come across one 'Perl of wisdom' from 'uri'.
You've not lurked long enough. Reading Uri's work has been a
'transforming' experience for me.
Steve
------------------------------
Date: Wed, 12 Jul 2000 03:17:56 GMT
From: David Ness <DNess@Home.Com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <396BE356.F1C499B3@Home.Com>
p3rlc0dr@my-deja.com wrote:
>
> The best and most smart of people are the quiet ones. Watch out for
> them!
>
Again, I guess our experiences differ. I have graded several thousand
students over the years and the `quiet ones' were quite often quiet because
their mind was somewhere else (or I _hope_ it was somewhere else, it certainly
wasn't on the subject material of the course)...
------------------------------
Date: Wed, 12 Jul 2000 03:46:17 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <x7aefoko3a.fsf@home.sysarch.com>
>>>>> "p" == p3rlc0dr <p3rlc0dr@my-deja.com> writes:
p> In article <396b8ac2@news.victoria.tc.ca>,
p> yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones) wrote:
>>
>> Please be careful if you use Matt's code.
p> Whats wrong with his code its really helpful in his book?!
well, now that you asked! :)
his code was written when he was in high school and barely knw how to
program. he put his scripts on the web and they became famous for being
there. they have some of the worst perl code you can ever find anywhere
and most of the bugs havce never been fixed. some have but the programs
overall still suck. the book is horrible. one time i found a copy at a
workplace and declared, "i will open this book at a random page and find
something wrong." i did that 4 times in a row. it was too easy. not only
is it based on matt's bad code, the text is lousy and full of mistakes
and it shows how little perl matt and patchet know.
so, go ahead and use it, but don't ask anyone here for help with fixing
or modifying it. many have asked here and they rightfully get told to go
elsewhere.
finally, your nickname is kewltawk and foolish. you are not a perlcoder
and shouldnt claim it no matter how you encode it.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Tue, 11 Jul 2000 23:46:01 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <396BE9F9.967711DC@attglobal.net>
p3rlc0dr@my-deja.com wrote:
>
> In article <396BCBDA.599FEC1F@attglobal.net>,
> care227@attglobal.net wrote:
> > p3rlc0dr@my-deja.com wrote:
> > >
> > >
> > > I read a nice book of Matt Wright. Matt says Perl is the web code.
> > >
> >
> > I do think this group is being trolled again...
> >
>
> I'm not understand troll Drew Simonis. Explan?
I'll bite, even though this "I don't speak good english" crap is a
bit tired. Your usage and grammer are markedly worse in every
subsequent post you make. You started out using common slang and
mixed case haXor speak, and now you have degraded into some kind of
Godzilla movie psuedo-english.
^^^^^^^^
http://www.jargonfile.org/jargon/html/entry/troll.html
------------------------------
Date: Wed, 12 Jul 2000 01:51:12 GMT
From: Ha Quach <ha@linux1.org>
Subject: Re: CGI-to-NT service communication.....
Message-Id: <396BD32F.B3CA5A3A@linux1.org>
source code may be useful.
-ha.
Greg Treece wrote:
>
> I am trying to feed some information from a cgi program (Apache) to an
> NT service via a socket and
> my perl script cannot open its socket connection. This works when run
> from the command
> line. Are there interprocess security settings somewhere to make this
> happen?
------------------------------
Date: Tue, 11 Jul 2000 19:47:10 -0600
From: Ron Reidy <rereidy@indra.com>
Subject: Re: DBI->connect question
Message-Id: <396BCE1E.55600D8C@indra.com>
Jeff Lacki wrote:
>
> Does anyone have a way to protect the DBI->connect() call so
> that if the DB server is not running (for whatever reason),
> perl doesnt just bail out with an error?
>
> I tried something like:
>
> # connect to DB
> my $dbh = DBI->connect($dsn,$user,$passwd, <---line 108
> { RaiseError => 1, AutoCommit => 1 });
>
> if (!defined($dbh)) { db_temp_down(); }
>
> however the code never gets beyond the first line (connect).
>
> I just get this in the apache err log:
>
> DBI->connect failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) at /home/httpd/cgi-bin/internal_edit_db.pl line 108
>
> tia
> Jeff
Jeff,
I don't have access to the DBI docs at this moment, but here goes...
1. Change your RaiseError => 1 to RaiseError => 0. This will keep you
from bailing out at connect() failure.
2. You might also think of wrapping the connect() call inside an eval
{...} block.
You are making a **really big** assumption that if the connection fails,
then the DB server is down. I certainly wouldn't assume this. You
should investigate other means of determining if the server is down
(i.e. ping it in some way, like Oracle's tnsping command).
Good luck.
--
Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.
------------------------------
Date: Wed, 12 Jul 2000 01:55:16 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: DBI->connect question
Message-Id: <396BD03E.50FD1D86@rochester.rr.com>
Jeff Lacki wrote:
>
> Does anyone have a way to protect the DBI->connect() call so
> that if the DB server is not running (for whatever reason),
> perl doesnt just bail out with an error?
...
> my $dbh = DBI->connect($dsn,$user,$passwd, <---line 108
> { RaiseError => 1, AutoCommit => 1 });
...
Well, you did say {RaiseError=>1}, so (*wow* *amazing* *who'd have
thought*) it raised an error. Take that out, and execution will proceed
nicely in spite of errors. Of course, then you should check to see if
you got an error yourself, because if you did, the rest of your program
won't work so well without a connection.
Next, you'll probably ask how to get rid of the message connect will
print for you in spite of the fact that it didn't terminate execution.
Check out the PrintError attribute for info on that.
...
> Jeff
--
Bob Walton
------------------------------
Date: Wed, 12 Jul 2000 01:25:03 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: easy one for xperienced users.. hard for me...
Message-Id: <396BC92A.CEA037FB@rochester.rr.com>
jason iversen wrote:
...
> ok, so maybe my explanation wasnt wonderful, but you got it clearly.
>
> this is getting closer... it nearly works, except for the last record.
> if you execute this with
>
> perlscript.pl fileB fileA > fileC
>
> #!/usr/local/bin/perl -w
> $/='command'; #assumes "command"'s separated by null lines
The commentary here doesn't match what happens. This assumes records
are separated by the string 'command'. Be careful -- that will separate
records on *any* instance of the word 'command', but just the one you
want. So if 'command' appears anywhere in the text, it will separate
records on that. I also don't recommend you use something like 'command
{' as a record separator, since that is not fulfulling the job of a
record separator in your data scheme.
> while(<>){
> unless(/\n\s*name\s*"([^ ]+)"/){next}
Note that the above regex will match on a newline followed by optional
whitespace followed by a literal 'name' followed by optional whitespace
followed by a " followed by a greedy one or more non-space characters
followed by a ". That won't match what you think it will -- you'd be
better off sticking with the original [^"]+ specification which will
match
> $h{$1}=$_;
> }
> print "\ncommand"; #maintain initial null line
This was needed because of using 'command' as a record separator. Also,
the commentary doesn't match what it does.
> for(keys %h){
> print $h{$_};
> }
...
> but for some reason, the last record of file A is a bit messed - it
> doesnt have the command line. if you know if why the last record is
> being scribbled, please share! i'm going to keep whacking it, though.
With 'command' functioning as a record separator, the last record is not
terminated with 'command'. Therefore, it isn't on the end of the
string. Remember that it is not necessarily the last one printed, and
that there are two "last" records -- one from fileB and one from fileA.
...
> --
> jason iversen
...
I recommend you make some modifications. First, forget the record
separator idea, as your data is not laid out that way. Every time you
read a line with 'command {' in it, you can process what was read
previouly, if anything, not forgetting to process the last record too.
Not as clean, a bit more overhead:
while(<>){
&process if /^\s*command\s*\{\s*$/;
$string.=$_;
}
&process; #process last 'command'
for(keys %h){
print $h{$_};
}
sub process{
my $s=$string; #save input locally
$string=''; #string is processed, destroy it
unless($s=~/\n\s*name\s*"([^"]+)"/){return} #valid record?
$h{$1}=$s; #save in hash
}
--
Bob Walton
------------------------------
Date: Wed, 12 Jul 2000 01:28:09 GMT
From: salvadorej@my-deja.com
Subject: How can I use HTML::Parser to get images from HTML file
Message-Id: <8kghis$iq2$1@nnrp1.deja.com>
I'm just looking through the O'Reilly online books right now
-- most especially Clinton Wong's "Web Client Programming with PERL".
I'm interested in learning to use LWP and related things, and
the particular task with which I'm concerned at the moment, is
how to get a list of URLs for images contained in an HTML file.
I'm pretty sure the relevant methods are in HTML::Parser, but
I can't seem to extract the particulars from Wong's work.
Anyone want to explain?
Comments on learning to use LWP, HTTP, HTML modules in general
are also welcome.
--
============================================================
"The best laid plans of mice and men are about equal"
iowa_so8ng@hot8mail.com
Adress is spam-resistant; remove eight's to reach me.
Also, the header address (salvadoreh)is spam-bait.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 11 Jul 2000 18:45:33 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: How can I use HTML::Parser to get images from HTML file
Message-Id: <m1em50t936.fsf@halfdome.holdit.com>
>>>>> "salvadorej" == salvadorej <salvadorej@my-deja.com> writes:
salvadorej> I'm interested in learning to use LWP and related things,
salvadorej> and the particular task with which I'm concerned at the
salvadorej> moment, is how to get a list of URLs for images contained
salvadorej> in an HTML file. I'm pretty sure the relevant methods are
salvadorej> in HTML::Parser, but I can't seem to extract the
salvadorej> particulars from Wong's work.
Check Image::Grab in the CPAN. Much simpler.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Wed, 12 Jul 2000 02:02:37 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: How can I use HTML::Parser to get images from HTML file
Message-Id: <396BD1FC.EA0716C9@rochester.rr.com>
salvadorej@my-deja.com wrote:
>
> I'm just looking through the O'Reilly online books right now
> -- most especially Clinton Wong's "Web Client Programming with PERL".
> I'm interested in learning to use LWP and related things, and
> the particular task with which I'm concerned at the moment, is
> how to get a list of URLs for images contained in an HTML file.
> I'm pretty sure the relevant methods are in HTML::Parser, but
> I can't seem to extract the particulars from Wong's work.
> Anyone want to explain?
You're on the right track. Do:
perldoc HTML::Parser
at your command prompt.
...
--
Bob Walton
------------------------------
Date: 12 Jul 2000 02:00:34 GMT
From: is83024@cis.nctu.edu.tw (doco)
Subject: how to make my program with csh
Message-Id: <8kgjg2$m0s$2@news.cis.nctu.edu.tw>
I saw the perl FAQs, it says that the example in eg/nih
,but i cannot find it, please tell me how to make my program with csh,
i want to transfer the follow csh promgram into perl
#!/usr/bin/csh
tar cvf kkk.tar . >&! error
--
*
I can see through the star into your heart *¡@¡¯
So no mater where you are , it's never far
¡D . ¡@¡@ I hold you in my soul you always be
Here with me forever you must believe
I am wating¡@for you ¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡¯
I am wating for you in my heart.......
¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@ *.
------------------------------
Date: Tue, 11 Jul 2000 23:41:33 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: how to make my program with csh
Message-Id: <396BE8ED.903492B2@attglobal.net>
doco wrote:
>
> I saw the perl FAQs, it says that the example in eg/nih
> ,but i cannot find it, please tell me how to make my program with csh,
I notice English isn't your native language, so lets make sure
I understand your question: You have the example below written
in c shell syntax, and you would like to convert it to Perl, right?
> i want to transfer the follow csh promgram into perl
> #!/usr/bin/csh
> tar cvf kkk.tar . >&! error
If all you want to do is execute that one command, you can use
several means. Using the system() function, the exec() function
or the backwards quotes (the ` charachter, or the qx{} quoting
method) They each do different things, but they all would suffice
for the execution of an external program.
At your Unix command prompt, type the following for online documentation
of these functions:
perldoc -f system # for system()
perldoc -f exec # for exec
perldoc perlop # look for information on back quotes (`) under the
# heading "Quote and Quote Like Operators"
You might also like to take a look at the CPAN archive, which has some
nice Perl modules to do archiving and backup.
HTH
------------------------------
Date: Tue, 11 Jul 2000 21:44:23 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Is there a way to make a perl script into an executable?
Message-Id: <396BCD77.B28125CE@attglobal.net>
Bacbalabby wrote:
>
> He probably just knew that you have way more time on your hands than he
> does :)
>
I get paid to read Usenet. I can't help it. =)
------------------------------
Date: Tue, 11 Jul 2000 21:46:38 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Is this an application for PERL??
Message-Id: <396BCDFE.E37A3AF2@attglobal.net>
Peter Brooker wrote:
> I do this frequently and consequently I want to write a script that will
> create an html file to display these gifs in sequence. This file will
> work as follows. When the user clicks on the html file, he/she will see
> the first gif file with a forward and backward arrow at the bottom of
> the screen. Clicking on the forward arrow will allow the user to display
>
> the next gif image. The backward arrow will display the previous image
> in the sequence.
>
> I am guessing that a PERL script could be created that could
> "automatically" create the html file. Am I correct?
Yes. Rather easily using 1 array, 1 hidden field and CGI.pm
> Is using a PERL script a good way to go?
Yes.
------------------------------
Date: Wed, 12 Jul 2000 13:47:06 +1200
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Is this an application for PERL??
Message-Id: <8kgioh$p3v$1@hermes.nz.eds.com>
Peter Brooker wrote in message <396BBDB9.1DC59A08@email.sps.mot.com>...
>I have an application that produces a numerical sequence of *.gif files.
>
>The sequence looks like
>
>n1_dio_001.gif
>n1_dio_002.gif
>.
>.
>n1_dio_xxx.gif, 50 < xxx < 200
>
>I do this frequently and consequently I want to write a script that will
>
>create an html file to display these gifs in sequence. This file will
>work as follows. When the user clicks on the html file, he/she will see
>the first gif file with a forward and backward arrow at the bottom of
>the screen. Clicking on the forward arrow will allow the user to display
>
>the next gif image. The backward arrow will display the previous image
>in the sequence.
>
>I am guessing that a PERL script could be created that could
>"automatically" create the html file. Am I correct?
>
>Is using a PERL script a good way to go?
No, but you could use a Perl script.
What you are describing is a slideshow. Have a look at
http://cgi.resourceindex.com/Programs_and_Scripts/Perl/Image_Display/Slide_S
hows/ for some ideas.
------------------------------
Date: 11 Jul 2000 21:02:58 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Printing web pages
Message-Id: <87sntgw1f1.fsf@limey.hpcc.uh.edu>
>> On Tue, 11 Jul 2000 19:29:46 GMT,
>> aaronp243@my-deja.com said:
> Hi! I am trying to print a web page using perl as if
> the web page were being printed from netscape. I want
> to do this with perl because I have to print out many of
> the web pages! Any ideas would be appreciated! Thanks
> in advance.
perldoc lwpcook
to find out how to grab stuff off the web in perl.
perldoc HTML::TreeBuilder
perldoc HTML::FormatPS
will parse the HTML and let you output it as PostScript.
(Alternatively netscape can be controlled remotely from
the command line, so you might be able to tell netscape to
print through a script. But this is clpm, so that would
be blasphemous. :-)
hth
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: Wed, 12 Jul 2000 02:06:00 GMT
From: ynotssor@my-deja.com
Subject: Re: running system command as root from perl
Message-Id: <8kgjpv$k67$1@nnrp1.deja.com>
In article <brian-ya02408000R1107001754180001@news.panix.com>,
brian@smithrenaud.com (brian d foy) wrote:
...
> it's in the apache docs. *shrug* don't complain to me if you
> need to run six different processes when there is something
> much simpler and documented.
...
If you will allow it please, I would only complain to you about the
insulting tone of your post.
Your knowledge is always welcomed.
- tony
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 11 Jul 2000 09:08:18 -0400
From: EPROM <eprom007@hotmail.com>
Subject: Re: stupid perl question
Message-Id: <396B1C42.2F1B027B@hotmail.com>
Uri Guttman wrote:
>
> and for work you won't learn perl?
No, not that I won't learn Perl, but it makes little sense to me to read for
hours
trying to figure something out, if there is a more simple way. Yesterday I
spent
4 hours trying to figure why a simple Perl script wasn't working, come to find
out,
I was using an outdated version, and the location switched from /usr/bin/perl
to
/usr/local/bin/perl.
> how little are they paying you?
not a whole lot to be honest, and this is a take-home-from-the-office
kind of project.
>
> if you are not a perl programmer then why are you hacking perl?
My job is to keep track of about a 1000+ handheld radios, each time
a radio keys up, its recorded in a plain text file.
My work project consists of searching about 3000+ one Meg files.
for certain strings. I wrote the original script in csh, but figured it may
run faster using Perl...
> i am not
> a brain surgeon and my boss (which happens to be myself) doesn't make me
> mess around in other people's skulls.
My supervisor doesn't bother me, as long as the job is done. So in a way
I am my own boss too. Its up to me to figure out *how* the job gets done.
> work. and his (typical) disdain for the docs and faq is annoying. what
> are they paying you for? posting questions on usenet and sitting around
> waiting for a spoonfed answer?
>
> sheesh yourself!
I find that most man pages are worse than the books (usually). Wouldn't you
agree?
But your right, docs and faq are the first place that one should look...I just
strongly doubted it would be in there.
Oh, and they are paying me for my job; my job certainly doesn't call for me to
put in overtime or work on projects on my off time. No one is going to fire me
if
I don't learn Perl, its just that im just trying to improve on the way I do
things. :)
oh well....back to square one..
I guess Perl isn't for everyone.
.
------------------------------
Date: Wed, 12 Jul 2000 01:49:55 GMT
From: salvadorej@my-deja.com
To: Magic@mattnet.freeserve.co.uk
Subject: Re: Welcome to....
Message-Id: <8kgirv$jkn$1@nnrp1.deja.com>
> comp.lang.perl.lets-make-life-as-difficult-as-possible
>Although the people in it have good intentions and are willing
>to
>help
>they are so concerned with the complicated things about the
>language that in order to answer a simple quastion they seem to think
>reading a 140+ page document is required.
Hmmmmmm.
By and large, I've had a very positive experience with this newsgroup...
more so than with many others (say, various Java or Pascal or Foxpro
newsgroups). People have given me simple answers. People have
pointed me to appropriate documentation. People have even actually
taken time to look at my code and study it and offer solutions. Of
course, I've also gotten terse and/or RTFM type
responses, but that's par for the course. And some of those answers,
if rude in tone, were even helpful. Be patient with people. That's
newsgroups. If someone is mean or unhelpful, just blow it off. There's
other people around. That's usenet. Some days, people who are helpful
and know how to help you answer your posts. Somedays they don't.
If you are a complete beginner, the newsgroup is probably really
not the place to start. I wasn't a complete Perl newbie when I started
posting questions here. I'd read bits of the camel book. Most of my
Perl was really just C code with a few Perl features thrown in. Come
to think of it, it still sort of resembles that. Some people in this
newsgroup are probably still annoyed by my posts. And perhaps they
should be. Though most of my questions are well thought out,
occasionally I ask lazy ones.
>Perl is a dangerous language to attempt to learn because one
>wrong
>move and you erase all your files, plus probably several other peoples
>in the process.
I sense a bad experience with Perl here. I've had a few, though none
this bad. I think I understand your frustration -- it's sometimes hard
to predict what Perl will do, and there's sometimes side effects that
you might not anticipate to various commands. But hang in there. Perl
is worth it (and if you don't want to, I hear Python offers a fair
subset of Perl features and is much easier to read and predict. That's
hearsay, though). Swiss army chainsaw. No kidding.
============================================================
"The best laid plans of mice and men are about equal"
iowa_so8ng@hot8mail.com
Adress is spam-resistant; remove eight's to reach me.
Also, the header address (salvadoreh)is spam-bait.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 11 Jul 2000 22:58:50 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: Which one is better? $_[0] or shift?
Message-Id: <slrn8mnoop.am3.abigail@alexandra.delanet.com>
Craig Berry (cberry@cinenet.net) wrote on MMDVII September MCMXCIII in
<URL:news:smnftlqmnd6110@corp.supernews.com>:
.. Abigail (abigail@delanet.com) wrote:
.. : I remained convinced that along with "open FH, url",
..
.. Oooh, that kind of makes me twitch...that's a *lot* of hidden
.. functionality under that hood.
And open doesn't already have lots of hidden functionality?
It fits *perfectly* in the fast magic open() is already performing.
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
-> define ("foldoc", "perl")) [0] -> print'
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 3631
**************************************