[13730] in Perl-Users-Digest
Perl-Users Digest, Issue: 1140 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 21 11:07:31 1999
Date: Thu, 21 Oct 1999 08: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: <940518310-v9-i1140@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 21 Oct 1999 Volume: 9 Number: 1140
Today's topics:
[OFFTOPIC] WAS: Re: this darn error <sariq@texas.net>
Archive scgilbert@my-deja.com
Re: Archive <newsposter@cthulhu.demon.nl>
Re: Associative Array (Tad McClellan)
Re: Clearing Variables? (Anno Siegel)
CSV files and file upload strangness. (I.J. Garlick)
Re: CSV files and file upload strangness. <ltl@rgsun5.viasystems.com>
dereferencing complex expression (Rich Ackerman)
Re: E-Mail via script Perl ? <gellyfish@gellyfish.com>
Re: E-Mail via script Perl ? <gellyfish@gellyfish.com>
Re: E-Mail via script Perl ? <lr@hpl.hp.com>
Re: File "cgi-lib.pl" not found in @INC? (Brett W. McCoy)
Re: file upload <gellyfish@gellyfish.com>
Re: flcoking a DBM (Bill Moseley)
Re: Formating text (Tad McClellan)
Re: Help - Can't figure this out c_j_marshall@my-deja.com
Re: How to send & recv via UDP ... with IO:: ?? <gellyfish@gellyfish.com>
Re: in need of example... (Brett W. McCoy)
Re: in need of example... <newsposter@cthulhu.demon.nl>
Re: in need of example... <lr@hpl.hp.com>
Re: newbie problem writing/reading a file (Bill Moseley)
Re: newbie problem writing/reading a file <Rik@fast-speed.demon.nl>
Re: newbie problem writing/reading a file <gellyfish@gellyfish.com>
Re: newbie problem writing/reading a file <Rik@fast-speed.demon.nl>
Re: NTRegSetKeySecurity <jtolley@bellatlantic.net>
Re: SGML/HTML parsing tool (Randal L. Schwartz)
Re: subroutine <madebeer@igc.apc.org>
Re: what is SHTML ? (Randal L. Schwartz)
WTB: Web Client Programming in Perl jmeacham@jhu.edu
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 21 Oct 1999 08:45:21 -0500
From: Tom Briles <sariq@texas.net>
Subject: [OFFTOPIC] WAS: Re: this darn error
Message-Id: <380F18F1.A00A2605@texas.net>
> Posted via CNET Help.com
> http://www.help.com/
help.com is disgusting.
The death of USENET?
- Tom
------------------------------
Date: Thu, 21 Oct 1999 14:07:07 GMT
From: scgilbert@my-deja.com
Subject: Archive
Message-Id: <7un6m0$1vj$1@nnrp1.deja.com>
Is there a searchable archive of the messages in this news group? I'd
hate to ask a question that's been covered before.
Thanks
Steve
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 21 Oct 1999 14:38:18 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Archive
Message-Id: <7un8gq$are$1@internal-news.uu.net>
scgilbert@my-deja.com wrote:
> Is there a searchable archive of the messages in this news group? I'd
> hate to ask a question that's been covered before.
> Sent via Deja.com http://www.deja.com/
^^^^^^^^^^^^^^^^^^^
How about looking around there?
Erik
------------------------------
Date: Thu, 21 Oct 1999 04:15:46 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Associative Array
Message-Id: <i3imu7.dgf.ln@magna.metronet.com>
Govindaraj (umungo01@shafika.vetri.com) wrote:
: I just like to know this...!!! Sorry, I am not able to find this in any
: perl references.....!!!
Really?
The very first reference you should check is the Perl FAQ,
followed by the other Standard Docs (the *.pod files).
So I guess you just missed it...
: %Year = ( "Jan" => "One", "Feb" => "Two", "Mar" => "Three", "April" =>
: "Four" );
: Why I cannot get the Output in the order I have give in the
: Associative Array
Perl FAQ, part 4:
"How can I make my hash remember the order I put elements into it?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 21 Oct 1999 13:09:59 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Clearing Variables?
Message-Id: <7un3b7$nsr$1@lublin.zrz.tu-berlin.de>
Bryan Gintz <bgintz@airlinksystems.com> wrote in comp.lang.perl.misc:
>Does anyone know how to clear variables. e.g. if i am going through a
>loop and I have 3 variables, if only 2 show up through the first
>iteration, I do not want the third variable from the first iteration
>showing up. let me know, thanks
It's not entirely clear what you mean by "show up", but you may want
to take a look at undef().
Anno
------------------------------
Date: Thu, 21 Oct 1999 13:01:11 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: CSV files and file upload strangness.
Message-Id: <FJyEu0.M7G@csc.liv.ac.uk>
Can anyone spot what is going on in the following? I have cut this code
down from a much larger script to just the lines that produce the problem
as quite frequently suggested here abouts.
Before anyone comments, I know I am not checking things rigourously from
the Text::CSV calls here (I do in the other code), but I am trying to keep
this small.
#!/usr/local/bin/perl5 -w
use strict;
use CGI;
use Text::CSV;
my $q = CGI::new();
print "Content-Type: text/plain\n\n";
my $filename = $q->param('file');
my $csv = Text::CSV->new();
# first line of upload file contains field names
# **** comment out the following 3 line ******
$csv->parse(<$filename>) || die "Error in fields description line";
my @field = $csv->fields();
print $csv->string();
my @line;
while (<$filename>) {
print "looping: ";
$csv->parse($_) || die "Error in input line";
@line = $csv->fields();
next unless @line;
print $csv->string();
}
# code ends here.
I get one single line of output when I try the above (with suitable file
upload html page calling the above script.)
If however I comment out the 3 lines mentioned I can get the full output
of the uploaded file.
It's as if the $filename value forgets it's a file pointer or whatever.
I could just read the entire CSV file in, but I am trying to be good and
just read a line at a time and process it. I need to read the first line
separately as this will contain the column headings for each subsequent
record. The number of columns can in this way be varied from file to file
(I hope).
Any help greatly appreciated.
--
Ian J. Garlick
ijg@csc.liv.ac.uk
Amnesia used to be my favorite word, but then I forgot it.
------------------------------
Date: 21 Oct 1999 14:07:23 GMT
From: lt lindley <ltl@rgsun5.viasystems.com>
Subject: Re: CSV files and file upload strangness.
Message-Id: <7un6mr$iua$1@rguxd.viasystems.com>
In comp.lang.perl.modules I.J. Garlick <ijg@connect.org.uk> wrote:
:># first line of upload file contains field names
:># **** comment out the following 3 line ******
:>$csv->parse(<$filename>) || die "Error in fields description line";
Isn't that <$filename> in list context? I think it slurped in the
entire file there leaving you nothing else.
$_ = <$filename>;
$csv->parse($_);
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: Thu, 21 Oct 1999 14:08:46 GMT
From: richmond@no.shadow.spam.net (Rich Ackerman)
Subject: dereferencing complex expression
Message-Id: <380f1b1b.143676255@news.mia.bellsouth.net>
I inherited some code with lots of references and I'm stumped on this
one. Can anyone decode this for me? Given that
$cclog_results->[0]->{'authcode'}
gives me the right thing, the value of an authorization code. This
means (tell me if I'm wrong <g>) that $cclog_results is an array of
references; the first one points to a hash table in which 'authcode'
is a key; the whole expression returns the value at that key. Right?
Then $cclog_results is returned from the function along with another
results hash, in this doozy:
my $results;
%{$results->[0]} = (%{payment_results->[0]}, %{$cclog_results->[0]});
return $results;
and my question is how to get to my authcode using $results. I would
think it would be:
$results->[1]->[0]->{'authcode'}
but that doesn't work. I've read all the stuff in the cookbook and the
camel and still can't figure this out. Can anyone tell me how I could
get to 'authcode' via $results?
------------------------------
Date: 21 Oct 1999 14:11:30 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: E-Mail via script Perl ?
Message-Id: <380f1102_2@newsread3.dircon.co.uk>
Mark Bakker <ceesbakk@casema.nl> wrote:
> Can you PLEASE repeat your questing in English???
Can you PLEASE not post in the Jeopardic style ?
Actually I think that most people would agree that if a poster is not
comfortable with English then it might be better to post in their native
language - it is better that a smaller number of people understand than
a whole lot of people get confused.
You can always use <http://babelfish.altavista.com> to get a rough
translation ....
/J\
--
"You're blowing me off for a monkey?" - Joey, Friends
------------------------------
Date: 21 Oct 1999 14:33:46 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: E-Mail via script Perl ?
Message-Id: <380f163a_2@newsread3.dircon.co.uk>
Frederic TYNDIUK <tyndiuk@ftls.org> wrote:
>
> Please Use fr.comp.lang.perl to post in french....
>
This is an international group - I dont think that it states in the charter
which language is to be used ....
> If you want use Sendmail, you can use this :
>
> $mailprog = "/usr/sbin/sendmail";
> $to = "sername\@host.com";
> open(MAIL,"|$mailprog $to") || die "Can't open $mailprog, error $!\n";
>
Except if the variable $to was derived from user input you have just
exposed that input to the shell with potentially disastrous consequences.
Please read the sendmail manpage with special emphasis on the '-t' switch.
/J\
--
"I came on the train but I think I managed to pass it off as an asthma
attack" - Jenny Eclair
------------------------------
Date: Thu, 21 Oct 1999 07:53:23 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: E-Mail via script Perl ?
Message-Id: <MPG.1278c8bbc2f642bb98a0e7@nntp.hpl.hp.com>
In article <380f163a_2@newsread3.dircon.co.uk> on 21 Oct 1999 14:33:46
+0100, Jonathan Stowe <gellyfish@gellyfish.com> says...
> Frederic TYNDIUK <tyndiuk@ftls.org> wrote:
> >
> > Please Use fr.comp.lang.perl to post in french....
Perhaps *also*, but not necessarily *instead of* here.
> This is an international group - I dont think that it states in the charter
> which language is to be used ....
I am reminded that Tom Phoenix, whose contributions we all value,
encourages people to be coherent in their native language rather than
incoherent in English. Especially if the native language is one of the
Babelfish languages (as you said in another response), this makes good
sense.
In this case, the French was very straightforward and easy to deal with.
(Of course, I have a working knowledge of French. :-) And the Subject:
is lucid English/Latin/geekspeak.
To push the issue in a slightly different direction, sometimes a well
written snippet of C might serve as a better framing for a Perl question
than English prose, or even a horrible Perl snippet. If you don't
understand C, then just move on to the next question.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 21 Oct 1999 13:25:10 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: File "cgi-lib.pl" not found in @INC?
Message-Id: <slrn80u5a9.llb.bmccoy@moebius.foiservices.com>
Also Sprach Thomas j. Evans <thomas@skyweb.net>:
>I have this Perl program that requires cgi-lib.pl, and keeps giving me
>a message saying:
>File "cgi-lib.pl" not found in @INC at line 12......
I recommend getting rid of cgi-lib.pl and upgrading to CGI.pm -- it's a
much better module and is still being supported. You'll have to rewrtie
your CGI scripts, however.
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: 21 Oct 1999 15:38:46 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: file upload
Message-Id: <380f2576_1@newsread3.dircon.co.uk>
CS <@mdo.net> wrote:
>
>>but the file that is uploaded, gets corrupted, or at least
>>pictures get messed up,
>
> You have to use binmode before you do any reading or writing to your files.
>
> open INFILE, "<$myfile";
>
Except that you really must check that the file was opened successfully:
open INFILE, "$myfile" or die "Cant open $myfile - $!\n";
> binmode(INFILE);
>
> # whatever else you do to that file here.
>
> open OUTFILE, ">$yourfile";
>
Except that you really must check that the file was opened successfully:
open INFILE, ">$yourfile" or die "Cant open $yourfile - $!\n";
> binmode(OUTFILE);
>
> # etc.
>
/J\
--
"As usual I'm the price you have to pay for the funny bits" - Denis Norden
------------------------------
Date: Thu, 21 Oct 1999 06:40:26 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: flcoking a DBM
Message-Id: <MPG.1278b7a8ce685067989819@nntp1.ba.best.com>
Darrick Wolfe (thebravo@netzero.net) seems to say...
> I was wondering if using the flock function works with DBM files? I
> know how to use flock with regular files, just not sure about using it
> with DBM. Would I have to flock both the .dir and .pag files? or is it
> even necessary?
Perl Cookbook has an example of doing what you want. You have that
book, right?
But I just use a lock file (usually flock a log file).
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Thu, 21 Oct 1999 04:30:23 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Formating text
Message-Id: <vuimu7.tlf.ln@magna.metronet.com>
J-P Theberge (jphil@act.oda.fr) wrote:
: I want to take some text (coming from
: a <textarea> form) and output it like
: this message (i.e. with a maximum
: line length and a fixed left margin).
: Is there a specific module to help me
: do it? Or can you give me some hints
: on how to do it?
Text::Wrap;
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 21 Oct 1999 14:42:27 GMT
From: c_j_marshall@my-deja.com
Subject: Re: Help - Can't figure this out
Message-Id: <7un8oi$3r6$1@nnrp1.deja.com>
>
> Often, too often, when a female of the species threatens the male of
the
> species, she is deemed 'bitch' regardless of age or maturity level. It
> is a word used too casually I think.
>
Disputes between canines notwithstanding...
(I was going to say 'catfights between'. But didn't).
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 21 Oct 1999 14:26:17 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to send & recv via UDP ... with IO:: ??
Message-Id: <380f1479_2@newsread3.dircon.co.uk>
John Stumbles <visstmbl@reading.ac.uk> wrote:
>
> I know this is a pretty simple-minded (OK, clueless :-) approach:
> UDP is connectionless and so some of the abstractions in the OO model for
> TCP have no equivalents for UDP. Can anybody show me how it should be
> done?
>
I would suggest that you look at :
<http://docs.freebsd.org/44doc/psd/21.ipc/paper.html>
Particularly the section on Connectionless servers.
Alternatively you could have the server read and write its stdio
and run it from inetd with an entry in /etc/inetd.conf ;-}
/J\
--
"Two or three of our staff were stoned on their way to work" - British
Airways Spokesman
------------------------------
Date: Thu, 21 Oct 1999 13:33:03 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: in need of example...
Message-Id: <slrn80u5p2.llb.bmccoy@moebius.foiservices.com>
Also Sprach Jeremiah Stanley <miah@idcomm.com>:
>Can anyone send me in the direction of a good example of listing and sorting
>directories under Linux? I need to have a way to sort out .gif's and .jpg's
>into an array and then output the list into HTML. I have the HTML part done,
>but how do I do an 'ls' into an array so that I can sort it? So far all I
>have done is wear out my harddrive and gotten frustrated! :)
You'd want to use the DirHandle module to do that:
$image_dir = new FileHandle;
$image_dir->open($fullpath);
#error handling code goes here
@files = grep /^(0*$doc)\.\d{3}/, $image_dir->read;
(you can filter out filenames by passing the output of FileHandle->read
through grep in a list context, and everything gets dumped into an array)
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: 21 Oct 1999 13:50:57 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: in need of example...
Message-Id: <7un5o1$840$2@internal-news.uu.net>
Larry Rosler <lr@hpl.hp.com> wrote:
> In article <7ul91q$3td$2@internal-news.uu.net> on 20 Oct 1999 20:35:06
> GMT, Erik van Roode <newsposter@cthulhu.demon.nl> says...
>>
>> Check out the opendir, the grep, and the sort functions.
> Don't forget the readdir function, which is the one that does the heavy
> lifting! :-)
Then you have to mention the closedir as well ;) But seriously, the original
poster asked for references. The opendir docs have refs to readdir/closedir
so I thought checking those would be natural.
I saw someone else posted a solution using `/bin/ls -1`. It didn't even work!
Erik
------------------------------
Date: Thu, 21 Oct 1999 07:32:06 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: in need of example...
Message-Id: <MPG.1278c3c261263a7f98a0e6@nntp.hpl.hp.com>
In article <slrn80u5p2.llb.bmccoy@moebius.foiservices.com> on Thu, 21
Oct 1999 13:33:03 GMT, Brett W. McCoy <bmccoy@foiservices.com> says...
...
> You'd want to use the DirHandle module to do that:
>
> $image_dir = new FileHandle;
>
> $image_dir->open($fullpath);
> #error handling code goes here
>
> @files = grep /^(0*$doc)\.\d{3}/, $image_dir->read;
>
> (you can filter out filenames by passing the output of FileHandle->read
> through grep in a list context, and everything gets dumped into an array)
As Tom Christiansen isn't around to grumble about this, I'll try
instead. Someone ought to.
Please, someone, please give me one (1) reason why this code is better
than using, e.g.:
{
local *DIRHANDLE;
opendir DIRHANDLE, ...
... readdir DIRHANDLE ...
}
Just one reason. Please?
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 21 Oct 1999 06:47:48 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: newbie problem writing/reading a file
Message-Id: <MPG.1278b95cf7539f3e98981a@nntp1.ba.best.com>
Rik Driever (Rik@fast-speed.demon.nl) seems to say...
> I read some tutorials and downloaded some scripts from the internet, but
> I can't get any of the scripts to work...the only one which actually
> worked was the 'Hello World' script, but that's no help :-)
Here's the deal. You post a small amount of code the compiles but
doesn't work, or you leave the area of the code blank that you are lost
on and you get help.
Type:
perldoc CGI
> So my question is: Is there somebody out there who would be so kind to
> give me some code? I would REALLY appreciate it!
You can learn from other's code, but I'd really recommend not using code
you find on the Internet in your own programs if you don't understand it
completely.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Thu, 21 Oct 1999 16:20:36 +0200
From: Rik Driever <Rik@fast-speed.demon.nl>
Subject: Re: newbie problem writing/reading a file
Message-Id: <mLgfzAA0EyD4Iw9R@fast-speed.demon.nl>
OK I will:
#!/usr/local/bin/perl
#This code is for appending the values to the file
$file = 'score.txt';
open(MYFILE, >>$file);
print MYFILE "This line goes to the file.\n";
#Here should be the code to add a value from a form to the file...
#Probably something like: print MYFILE "@formvalue";
close(MYFILE);
#!/usr/local/bin/perl
#With this code I'm trying to show the values from the text file
#in html
$file = 'score.txt';
open(MYFILE, $file);
@lines = <MYFILE>;
close(MYFILE);
print "Content-Type: text/html\n\n";
print "<HTML><BODY>";
print "<H1>Results</H1>";
print "<p>";
print "@lines";
print "</p>";
print "</BODY></HTML>";
I hope this is enough...
Greetings Rik Driever.
In article <MPG.1278b95cf7539f3e98981a@nntp1.ba.best.com>, Bill Moseley
<moseley@best.com> writes
>Rik Driever (Rik@fast-speed.demon.nl) seems to say...
>> I read some tutorials and downloaded some scripts from the internet, but
>> I can't get any of the scripts to work...the only one which actually
>> worked was the 'Hello World' script, but that's no help :-)
>
>Here's the deal. You post a small amount of code the compiles but
>doesn't work, or you leave the area of the code blank that you are lost
>on and you get help.
>
>Type:
>perldoc CGI
>
>
>> So my question is: Is there somebody out there who would be so kind to
>> give me some code? I would REALLY appreciate it!
>
>You can learn from other's code, but I'd really recommend not using code
>you find on the Internet in your own programs if you don't understand it
>completely.
>
--
Rik Driever
------------------------------
Date: 21 Oct 1999 15:39:56 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: newbie problem writing/reading a file
Message-Id: <380f25bc_1@newsread3.dircon.co.uk>
Rik Driever <Rik@fast-speed.demon.nl> wrote:
>
> So my question is: Is there somebody out there who would be so kind to
> give me some code? I would REALLY appreciate it!
>
Most people here would appreciate it if you showed us some of the
code that you tried and found not to work ...
/J\
--
"Childbirth is god's way of telling you that heterosexuality isn't
natural. It's got to be easier to get a penis up your arse than a baby
out of your vagina" - Graham Norton
------------------------------
Date: Thu, 21 Oct 1999 16:42:27 +0200
From: Rik Driever <Rik@fast-speed.demon.nl>
Subject: Re: newbie problem writing/reading a file
Message-Id: <775YvCATZyD4IwdA@fast-speed.demon.nl>
I did, see my second posting.
In article <380f25bc_1@newsread3.dircon.co.uk>, Jonathan Stowe
<gellyfish@gellyfish.com> writes
>Rik Driever <Rik@fast-speed.demon.nl> wrote:
>>
>> So my question is: Is there somebody out there who would be so kind to
>> give me some code? I would REALLY appreciate it!
>>
>
>Most people here would appreciate it if you showed us some of the
>code that you tried and found not to work ...
>
>/J\
--
Rik Driever
------------------------------
Date: Thu, 21 Oct 1999 14:13:15 GMT
From: James Tolley <jtolley@bellatlantic.net>
Subject: Re: NTRegSetKeySecurity
Message-Id: <380F1EE9.439A6BE2@bellatlantic.net>
> Does anyone know of any sample code or how to correctly fill the values that
> the NTRegSetKeySecurity routine uses.
If this is an API call (sure sounds like it!), use Win32::API. You can get it by
using 'ppm' at the command prompt (just in case you were unaware).
hth
James
------------------------------
Date: 21 Oct 1999 07:53:38 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: SGML/HTML parsing tool
Message-Id: <m1iu40ix3h.fsf@halfdome.holdit.com>
>>>>> "kent" == kent <kent@darwin.eeb.uconn.edu> writes:
>>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:
Randal> For #1, I'm currently building a tool using
Randal> Parse::RecDecent that takes a DTD to generate a recursive
kent> <snip>
Randal> I can now see why SGML/HTML is a dead-end, and XML/XHTML
Randal> will rock. Those optional close-tags are *hard*, and XML
Randal> has none such.
kent> Just curious, are you using Parse::RecDescent rather than SGMLS
kent> because it allows a pure Perl solution, or is there some other
kent> advantage?
Partially to increase my knowledge of how P::RD works, partially
because I want a flexible toolbase that I can build from to add
pretty-printing, error-recovery, general rewrites, scanning and
extracting, etc. SGMLS probably doesn't have that.
print "Just another Perl hacker,"
--
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: Thu, 21 Oct 1999 00:41:17 -0700 (PDT)
From: Michael de Beer <madebeer@igc.apc.org>
Subject: Re: subroutine
Message-Id: <APC&1'0'50775dd5'a51@igc.apc.org>
rancor wrote:
> how do i get a subroutine to return a string?
first read perldoc -f return
sub asubroutine {
print "hello, in sub\n";
my $bar = 10;
return $bar;
}
-Mike
------------------------------
Date: 21 Oct 1999 07:07:28 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: what is SHTML ?
Message-Id: <m1puy8iz8f.fsf@halfdome.holdit.com>
>>>>> "Graham" == Graham W Boyes <me@toao.net> writes:
Graham> How about this:
Graham> Comp.lang.perl.newbie.newbie.newbie.newbie.newbie?!
Graham> Look, strange as it may seem, some of us *aren't* experts in
Graham> Perl! We are learning the language and we find it difficult!
Graham> If you folks who *are* experts can't handle answering simple
Graham> questions, then *DON'T!*
Most of us don't mind answering questions from newbies. In fact, we
don't mind so much that many of the answers to the most frequently
asked questions have already been gathered and included with YOUR
documentation. We expect others to look there first, not just come
right here with those. We've also answered many other questions in
the past, and expect others to use www.deja.com to at least take a
stab at it, or even read this group for a week or so to see both of
these things being repeatedly talked about.
It just gets annoying when this newsgroup (a gathering of beginners
and advanced Perl hackers) is treated like a help desk (newbies lined
up on hold on a 900 number to get "support") by the beginners.
It isn't. No Usenet group is like that. Well, that is, no Usenet
group was intended to be like that, but a large influx of culture-less
people seems to have invaded in the past few years that cannot be
bothered to read the docs for ANYTHING, including Usenet's owners
manual (repeatedly posted in news.announce.newusers).
So, those of us with the answers that the newbies seek continue to be
offended by the crudeness and lack of self motivation that a
questioner often displays.
For example, a weeks worth of reading in CLPM and CIWAC or CIWAH would
have shown that an SHTML question is clearly more web than Perl, and
therefore doesn't belong in CLPM. So that's why we get offended...
someone wasn't patient enough to spend a week figuring out "hey, how
do I use this usenet thing?". <sigh> The docs in
"news.announce.newusers" recommend a minimum of a week of reading
before the first post, but hey, nobody reads the docs anymore.
Maybe that's what we should say to every off-topic or FAQ-asking poster.
"We won't answer this. You didn't read news.announce.newusers."
Should be interesting to see how many puzzled reactions we get THEN. :)
print "Just another Perl hacker," # and usenet user since 1980...
--
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: Thu, 21 Oct 1999 13:56:00 GMT
From: jmeacham@jhu.edu
Subject: WTB: Web Client Programming in Perl
Message-Id: <7un618$1g8$1@nnrp1.deja.com>
This book seems to be out of print. If anyone has a copy they are
willing to sell, that'd be great. I also have the Perl Cookbook,
Programming Perl, Learning Perl, and Advanced Perl Programming, any one
of which I'd be willing to trade. Peace,
James Meacham
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
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 1140
**************************************