[13124] in Perl-Users-Digest
Perl-Users Digest, Issue: 534 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 15 01:07:15 1999
Date: Sat, 14 Aug 1999 22:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 14 Aug 1999 Volume: 9 Number: 534
Today's topics:
Re: CGI on MS Personal webserver <tbornhol@prioritytech.com>
Re: HARASSMENT -- Monthly Autoemail (Gil Harvey)
Re: HARASSMENT -- Monthly Autoemail (Jim Seymour)
Re: HARASSMENT -- Monthly Autoemail (Jim Seymour)
How to format string? <chi@cybie.com>
illegal character \015 (carrage return) <phanelt@jps.jammed.net>
Re: illegal character \015 (carrage return) <rick.delaney@home.com>
Re: Language survey <rra@stanford.edu>
Re: Language survey (Anno Siegel)
Re: Nastiness contrary to the spirit of perl? (Id Est)
Re: New User Q: MultiLine Match <rick.delaney@home.com>
Re: New User Q: MultiLine Match (Anno Siegel)
Re: Newbie help with typeglobs <shmooth@yahoo.com>
Port to PalmOS??? (Hansan Diwan)
Re: search script in need of help <shmooth@yahoo.com>
Simple Q: open(FILE,"http://...? <mms67@usa.net>
Re: Simple Q: open(FILE,"http://...? (Bill Moseley)
Re: Things my math teacher forgot to tell me (Anno Siegel)
Re: Wacky Programming Tales (Ben Caradoc-Davies)
Re: Wacky Programming Tales (Anno Siegel)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 15 Aug 1999 05:02:34 GMT
From: "Tim Bornholtz" <tbornhol@prioritytech.com>
Subject: Re: CGI on MS Personal webserver
Message-Id: <KRrt3.93$mH1.305@news.rdc1.ne.home.com>
Go to http://www.activestate.com and download perl from there. Then read
the documentation that comes with it.
hth,
Tim Bornholtz
tbornhol@prioritytech.com
Jun Chen <chen@compsci.cas.vanderbilt.edu> wrote in message
news:37B480FB.93FDD26D@compsci.cas.vanderbilt.edu...
> Hi, does any body know how to run CGI on MS personal web server?
> It is claimed to support CGI script but I have no idea how to make it
> work.
> Thanks in advance!
>
> --
> Jun Chen
> -----------------------------
> comped.cas.vanderbilt.edu/~chen
>
>
>
------------------------------
Date: Sun, 15 Aug 1999 03:35:54 GMT
From: gh@netquick.net (Gil Harvey)
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <37b6355f.18129321@news.interpath.net>
On 15 Aug 1999 02:09:53 GMT, fl_aggie@thepentagon.com (I R A Darth
Aggie) wrote:
>You realize that by posting to Usenet, you are implicitly permitting
>email responses?
No - I'm permetting responses to my post in the same forum I
posted. Get real....
------------------------------
Date: 15 Aug 1999 03:43:52 GMT
From: jseymour@jimsun.LinxNet.com (Jim Seymour)
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <7p5d1o$n3t$2@ink.msen.com>
In article <37B43687.B0525875@tiac.net>,
Uriel Wittenberg <urielw@tiac.net> writes:
[snip]
>
> Regardless of anyone's position on posting style, I would hope just
> about everyone understands the vindictive and antisocial nature of
> such behavior.
Assuming that Tom's remarks wrt to your posting style are
accurate: I might as well argue that your posting style is
"anti-social."
People who quote the entire text of the article they're
following up, and *particularly* those who place their comments
before all that quoting, are being massively inconsiderate and
lazy, IMO. Not to mention wasting bandwidth and disk space.
Perhaps you should consider getting the hint.
Regards,
Jim
--
Jim Seymour | PGP Public Key available at:
jseymour@jimsun.LinxNet.com | http://www.uk.pgp.net/pgpnet/pks-commands.html
http://home.msen.com/~jimsun | http://www.trustcenter.de/cgi-bin/SearchCert.cgi
------------------------------
Date: 15 Aug 1999 03:58:39 GMT
From: jseymour@jimsun.LinxNet.com (Jim Seymour)
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <7p5dtf$n3t$3@ink.msen.com>
In article <37b4d4b0.25250093@news.interpath.net>,
gh@netquick.net (Gil Harvey) writes:
[snip]
>
> I don't think any of us dispute TCs knowledge of perl - I also
> make much use of his writings - but that is no excuse for his assine
> email tactics.
[snip]
Would it be better if he corrected somebody's UseNet abuse in
public? No? Then not at all? Let the clueless just carry on--
sucking up excessive bandwidth and disk space, making life
miserable for all. Is that it?
Personally, the only thing I find "assine" [sic] about Tom's
emails is that he bothers to do it at all. Seems a waste of
time to me. Given the obvious lack of intelligence on the part
of certain of the recipients. Then again: if only *one* mind is
saved...
I apologize for the rather harsh tone my follow-up has taken.
But sometimes I get a mite peeved at the modern notion that
people ought to be allowed to behave in any anti-social manner
they like and that somehow anybody who attempts to correct their
behaviour is at fault.
Regards,
Jim
--
Jim Seymour | PGP Public Key available at:
jseymour@jimsun.LinxNet.com | http://www.uk.pgp.net/pgpnet/pks-commands.html
http://home.msen.com/~jimsun | http://www.trustcenter.de/cgi-bin/SearchCert.cgi
------------------------------
Date: Sat, 14 Aug 1999 21:54:12 -0700
From: Chi Yu <chi@cybie.com>
Subject: How to format string?
Message-Id: <37B647F4.F72C4DE9@cybie.com>
Greetings,
Can someone please help me format a string? I want to format a url into
a 12 character string, minus the periods and forcing each node to use 3
digits.
e.g. "212.67.198.54" would become "212067198054"
Is there a regular expression that will quickly accomplish this feat?
Thank you,
Chi
------------------------------
Date: Sat, 14 Aug 1999 21:12:28 -0700
From: Peter Hanely <phanelt@jps.jammed.net>
Subject: illegal character \015 (carrage return)
Message-Id: <37B63E2B.37714352@jps.jammed.net>
I recently upgraded from PERL 5.003 to 5.004.
With the upgrade I got a new problem. While PERL
5.003 treated
CR as whitespace, 5.004 gripes about an illegal
character. I could
process
my code files to fix the EOL convention, but I'd
rather the interpreter
treat the character as whitespace.
--
Peter Hanely =/\=
phanely@jps.jammed.net (email has been "jammed")
http://www.jps.net/mhanely
computer software etc. in Sac. Ca
Take a look at my shareware offerings.
------------------------------
Date: Sun, 15 Aug 1999 04:46:12 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: illegal character \015 (carrage return)
Message-Id: <37B64603.EF06B06B@home.com>
[posted & mailed]
Peter Hanely wrote:
>
> I recently upgraded from PERL 5.003 to 5.004.
That's Perl.
> With the upgrade I got a new problem. While PERL
> 5.003 treated
> CR as whitespace, 5.004 gripes about an illegal
> character.
If upgrading, why not upgrade to the latest? This problem is corrected
in 5.005. If you jump to 5.005, you will also get to bypass the other
5.004 spurious warning of
Value of <HANDLE> construct can be "0"; test with defined() at -e
line 65535.
when you use
while ($line = <FILE>) { }
It's possible that either or both of these fixes have been incorporated
into 5.004_05 (you didn't say which subversion you upgraded to). I'm
sure someone will pipe up if so.
Be sure to check out the appropriate perl*delta.pod files where the
differences are documented.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: 14 Aug 1999 20:49:36 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Language survey
Message-Id: <yl1zd5g0tr.fsf@windlord.stanford.edu>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
> Sometimes I wish Perl wasn't so damn popular. Is there a decent Forth
> interpreter for Linux?
You can try GNU Forth (<URL:ftp://ftp.gnu.org/gnu/gforth/>). Not being a
Forth programmer, I don't know how good it is. Another alternative is
TILE Forth, at <URL:ftp://ftp.gnu.org/gnu/tile-forth/>.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 15 Aug 1999 04:08:53 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Language survey
Message-Id: <7p5egl$v7m$1@lublin.zrz.tu-berlin.de>
Russ Allbery <rra@stanford.edu> wrote in comp.lang.perl.misc:
>Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
>
>> Sometimes I wish Perl wasn't so damn popular. Is there a decent Forth
>> interpreter for Linux?
>
>You can try GNU Forth (<URL:ftp://ftp.gnu.org/gnu/gforth/>). Not being a
>Forth programmer, I don't know how good it is. Another alternative is
>TILE Forth, at <URL:ftp://ftp.gnu.org/gnu/tile-forth/>.
Thanks. Though I was more joking than anything else, maybe I'll try
the gnu thingie, just for the fond memories... An AIM65 with 12 K
memory and no disk, forth transferred to eprom to tweak it, what fun.
The thing came with a one-line 20 chars display, two lines at extra
cost.
Did I hear someone say, off topic? Oh well...
Anno
------------------------------
Date: Sun, 15 Aug 1999 03:11:58 GMT
From: id-est@home.com (Id Est)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <slrn7rcbt5.9v9.id-est@erato.bigredrockeater.com>
In article <slrn7rc904.5k9.fl_aggie@thepentagon.com>, I R A Darth Aggie wrote:
>Please learn to properly quote, which means providing an attribution line.
>I've noticed this with @home users, is this an artifact of your ISP? if
>so, complain loudly and longly.
nah, it's me, just a bad old habit, sorry.
> Ok, it's bullying.
thank you. a small point, but an essential one. how many newbies gave
perl the toss when their first silly little question got them roasted?
how many of those newbies would have become good perl programmers? now
they're in the python camp, no doubt. mindshare is a terrible thing
to waste.
> Be a good little Usenaut, and answer all the newbie questions for the
> next month.
once i get as good as Abigail claims to be, i'll probably do just that.
but since i don't get the benefit of her experience, just her invective,
that may be some time.
btw, don't bother spewing on me Abigail. i plonked you 6 months ago and
so i won't see your no-doubt lucid commentary. no great loss, i'm sure.
------------------------------
Date: Sun, 15 Aug 1999 03:10:01 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: New User Q: MultiLine Match
Message-Id: <37B62F77.8CE649DE@home.com>
[posted & mailed]
Anno Siegel wrote:
>
> Kevin Newman <knewman@mcs.com> wrote in comp.lang.perl.misc:
> >
> >$/ = '';
>
> If you do that, looping over <> below doesn't make sense. The first
> <> will read the whole file, there's nothing left to loop over.
That really depends on whether or not there are blank lines in the file.
$/ = "" means paragraph mode. Perhaps you are thinking of $/ = undef.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: 15 Aug 1999 03:55:46 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: New User Q: MultiLine Match
Message-Id: <7p5do2$v5g$1@lublin.zrz.tu-berlin.de>
Rick Delaney <rick.delaney@home.com> wrote in comp.lang.perl.misc:
>[posted & mailed]
>
>Anno Siegel wrote:
>>
>> Kevin Newman <knewman@mcs.com> wrote in comp.lang.perl.misc:
>> >
>> >$/ = '';
>>
>> If you do that, looping over <> below doesn't make sense. The first
>> <> will read the whole file, there's nothing left to loop over.
>
>That really depends on whether or not there are blank lines in the file.
>
>$/ = "" means paragraph mode. Perhaps you are thinking of $/ = undef.
Dear me, yes, I was thinking of undef. Of course, in paragraph mode
the loop makes sense. Sorry for the confusion.
Anno
------------------------------
Date: Sun, 15 Aug 1999 03:54:57 GMT
From: Shmooth <shmooth@yahoo.com>
Subject: Re: Newbie help with typeglobs
Message-Id: <37B638D9.719E9AD7@yahoo.com>
take a look at &ReadParse and cgi-lib.pl for parsing form data...there is
at least 1 other that is recommeded...??
zzspectrez@my-deja.com wrote:
> Im trying to pass hash to subroutine so that I can modify
> it but it isnt working... Im looking in Programming perl and it
> shows...
>
> sub blah {
> local (*someary) = @_;
> <snip>
>
> &blah (*myary);
>
> Im trying this in a cgi-script and Im getting the following errors in
> my apache error log.
>
> Variable "%frm_data" is not imported at /usr/lib/cgi-bin/grade.pl line
> 32.
> Global symbol "frm_data" requires explicit package name at
> /usr/lib/cgi-bin/grade.pl line 32.
> Variable "%frm_data" is not imported at /usr/lib/cgi-bin/grade.pl line
> 33.
>
> a snippet of my code is::
>
> sub parse_html {
> local (*frm_data) = @_;
> blah.....
> if (defined($frm_data{$key})) {
> $frm_data{$key} = join ("\0", $frm_data{$key},$val);
> }else{
> $frm_data{$key} = $val;
> }
> blah...
> }
> blah...
>
> &parse_html (*quiz_data);
>
> blah...
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: 14 Aug 1999 23:22:52 -0400
From: jackal@acm.rpi.edu (Hansan Diwan)
Subject: Port to PalmOS???
Message-Id: <7p5bqc$oor$1@delenn.acm.rpi.edu>
Is there a port to PalmOS? If so, where might i find it?
--
Hasan Diwan
------------------------------
Date: Sun, 15 Aug 1999 05:04:57 GMT
From: Shmooth <shmooth@yahoo.com>
Subject: Re: search script in need of help
Message-Id: <37B64943.D4D192EA@yahoo.com>
I would start by running your program from the command line and seeing where the
error is. :)
Then, use 'splain' or add "use diagnostics -verbose;" to the top of your script
for help finding/fixing the errors...
mike wrote:
> this is what ive done and im getting 500 errors, im calling the script
> directly through the browser.
>
> #! /usr/bin/perl
>
> $content=get("http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&stype=stext&
> q=mike");
>
> content-type:text/html\n\n;
> print <<EndOfHTML;
> <html>
> <head><title>meta test</title></head>
>
> <body>
>
> <p align="center">$content</p>
>
> </body><html>
>
> EndOfHTML
> ;
> # end of code
>
> if someone could point me in the right direction of a good resource about
> creating a search engine
> or just knows what im doing wrong please post the solutions
------------------------------
Date: Sat, 14 Aug 1999 22:50:09 -0400
From: "mms67" <mms67@usa.net>
Subject: Simple Q: open(FILE,"http://...?
Message-Id: <7p59s9$4uh@enews1.newsguy.com>
Can I open a remote file in Perl like this:
open(FILE,"http://host/file"); ?
If not, how can the above be achieved?
Thanks.
------------------------------
Date: Sat, 14 Aug 1999 21:55:58 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Simple Q: open(FILE,"http://...?
Message-Id: <MPG.121fe83c371fcec69896b8@nntp1.ba.best.com>
mms67 (mms67@usa.net) seems to say...
> Can I open a remote file in Perl like this:
>
> open(FILE,"http://host/file"); ?
I assume you mean open for reading only...
Look at LWP::Simple and LWP::UserAgent and the few posts today where
this question was also answered. It's not as simple as you example
above, but damn near as simple.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: 15 Aug 1999 04:52:12 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Things my math teacher forgot to tell me
Message-Id: <7p5h1s$v91$1@lublin.zrz.tu-berlin.de>
John Callender <jbc@shell2.la.best.com> wrote in comp.lang.perl.misc:
>Disclaimer: Nothing to do with Perl. Followups to that effect endured
>silently, with head hung low.
[snip reasonable questions]
>This is silly, I know. But new immigrants often look silly as they try
>to contend with the unfamiliar ways of their new environment. Like I
>said, any pointers on how to address my remedial educational needs will
>be appreciated.
For an in-depth treatment of these things I still think Don Knuth,
_The Art of Computer Programming_ contains all you want to know,
probably all in the first volume. The only drawback may be that,
because of its age, it treats concepts that have been left by the
wayside in the meantime (like, for instance, ones complement
representation). You can usually skip the mathematical treatment
of things (which is pretty advanced in places) without losing the
context (one of the truly admirable properties of the impressive
work). Read the first few chapters, then use the index to jump
to things that interest you. The book is full of back-references,
so you won't get lost that way. Be prepared to invest some time,
it will pay.
Anno
------------------------------
Date: 15 Aug 1999 03:14:48 GMT
From: bmcd@es.co.nz (Ben Caradoc-Davies)
Subject: Re: Wacky Programming Tales
Message-Id: <slrn7rccem.ne.bmcd@ripley.sulaco.net>
[strange programming]
The most confidence uninspiring piece of code I ever had the displeasure to
maintain contained something like this (allegedly C++, but mainly it's
intersection with C):
i = 0;
while( i < max_index ) {
/* some copying or update (not modifying i) goes here */
i = i + 1;
}
This was written by a *very* expensive consultant working for a large
multinational accountancy firm.
Can anybody suggest an alternative construct which more accurately expresses
the programmer's intentions? There may be more than one way to do it, but,
puhleeze!
Idiomatic is not quite the word.
--
Ben Caradoc-Davies <bmcd@es.co.nz>
------------------------------
Date: 15 Aug 1999 03:22:08 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Wacky Programming Tales
Message-Id: <7p5bp0$v48$1@lublin.zrz.tu-berlin.de>
Tom Christiansen <tchrist@mox.perl.com> wrote in comp.lang.perl.misc:
>I don't remember whether it also had these, but I have
>seen them elsewhere:
>
> #define forever() for(;;)
> #define unless(expr) if(!expr)
Let's just hope they had the sense to really
#define unless(expr) if(!(expr))
or else all bets are off.
Anno
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 534
*************************************