[8700] in Perl-Users-Digest
Perl-Users Digest, Issue: 2317 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 14 12:07:27 1998
Date: Tue, 14 Apr 98 09:00:29 -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 Tue, 14 Apr 1998 Volume: 8 Number: 2317
Today's topics:
Re: @INC and avoiding -I (M.J.T. Guy)
Re: Alt. builds of win32? (Jim Weisgram)
Re: Bill Gates should be invited to O'Reilly's "Free So (Chris Nandor)
Re: Bill Gates should be invited to O'Reilly's "Free So (Tor Iver Wilhelmsen)
Re: Bill Gates should be invited to O'Reilly's "Free So <keithmur@mindspring.com>
Re: Bill Gates should be invited to O'Reilly's "Free So (Chris Nandor)
Re: Book: Perl Modules <fty@utk.edu>
Re: environnemt variables (Tor Iver Wilhelmsen)
Re: environnemt variables (Abigail)
Re: Error number Help wanted (Mark-Jason Dominus)
Re: Getting the name of an SMTP server <flavell@mail.cern.ch>
how to parse "this", "that", "other" (root)
Re: how to parse "this", "that", "other" (Mark-Jason Dominus)
how to parse a "this", "that", "and the ", "other" file scott@md.hscbklyn.edu
Re: How to read systemcommand value to a variable? <merlyn@stonehenge.com>
Re: i want to learn Perl. HELP! (Mark-Jason Dominus)
Re: info on cookies (Abigail)
Ksh to Perl conversion <bmalik@geocities.com>
Re: Perl 5.004_64 Slower??? lvirden@cas.org
Perl and DOS Console on Win32 <brhess@email.msn.com>
PERL for SINIX 5.43 (RM300)? <andres@gch.med.uni-muenchen.de>
Perl writes to DOS window instead of browser <rlp6@cornell.edu.nospam>
Re: Perl, HP-UX, and memory ... gold_bag@yahoo.com
Re: Project involving Word (Mark-Jason Dominus)
Re: Project involving Word (Frank)
Re: Remove newline <merlyn@stonehenge.com>
Returning an array from an XS routine? <johannes@nada.kth.se>
Re: SOLVED: qx scalar returned in a list context <jdf@pobox.com>
Re: where are the examples in the newer (blue) camel bo <merlyn@stonehenge.com>
Re: Which Win32 Perl (Matthew H. Gerlach)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 14 Apr 1998 15:21:49 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: @INC and avoiding -I
Message-Id: <6gvuud$p6b$1@lyra.csx.cam.ac.uk>
Bill Hess <brhess@email.msn.com> wrote:
>
>Now here's my question - How do I carry the modified @INC throughout the
>rest of the modules, without doing it explicitly - Is this possible?
@INC is global, so is automatically available to all subsequently "use"d
modules.
Mike Guy
------------------------------
Date: Tue, 14 Apr 1998 14:07:47 GMT
From: jweisgram@hotmail.com (Jim Weisgram)
Subject: Re: Alt. builds of win32?
Message-Id: <35366cfa.89313867@news.teleport.com>
jwk208@is8.nyu.edu (Jarett Kobek) wrote:
>
>Hey, hey, hey perl guys,
>
>I was wondering, are there any builds of Perl for Win32 that aren't
>console?
>
>Any magical builds that won't run that rancid MS-DOS garbage under
>my, ahem, rather splendid Win95 interface?
>
>
>-Jarett
>
>She looked kinda cute, you know?
>
>--
>Jarett W. Kobek, ROBEK, JOBEK... HOBEK + jwk208@is8.nyu.edu
>"My name is spelled with one 'R' and two 'T's, thank you for complying."
>"kissing you is so sweet." "may i kiss you again?"
>http://danae.politics.fas.nyu.edu/~jugular -- Hard core Spider Action.
If you choose the "standard distribution" version, (not the ActiveState version)
you will find a bunch of Tk related stuff included. I haven't worked with it on
Win32, but there are some running demos included that put a GUI on top of Win32
Perl.
--
All opinions expressed are mine and not my employers (but they ought to be)
Jim Weisgram
Oregon Department of Transportation
------------------------------
Date: Tue, 14 Apr 1998 10:02:01 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <pudge-1404981002020001@ppp-15.ts-1.kin.idt.net>
In article <6gvoqp$5eb$1@nargun.cc.uq.edu.au>,
J.McPherson@mailbox.uq.edu..au wrote:
# : # I do not think you have thought this through. Do you never think its
# : # useful to make an hypothesis and explore the consequences?
# : If there is a chance it is true, sure.
#
# so, if you think there is even the slightest possibility that your
# hypothesis might be false, you discard it immediately?
You assume that I have not thought through these issues before. Poor
methodology.
# : I've read Dawkins, and I think he is a looney.
#
# and why, pray tell, is Dawkins a looney? I think it fair to hypothesize
# that the people who read the groups to which is thread is posted would
# like to see some reasoning and logic from you about why you hold those
# particular views. Personally, I'm inclined to think that you don't really
# have the courage of your convictions.
Again, you assume that which you have no clue about. I might be willing
to point out here that if this type of "science" is practiced by those who
follow your viewpoints, then I am glad I am not a member of your club.
But that would be poor tactic, so I won't do it.
I do find it interesting that you find it "fair to hypothesize" something
and then make no effort to prove or disprove said hypothesis.
Interesting, indeed.
As to my views on Dawkins, I do think he is a looney, on more than one
level. But as to this discussion, I just think it is lunacy to speak of
objects that by definition cannot act as performing actions.
# Yes, the information has been acted upon, but the information referred
# to has _acted_ upon you and now me to produce your postings and mine -
# information is not neutral, nor is it passive.
How has the information acted upon me? Are you nuts? Please describe how
this information acted. Did it look out from the screen at me? If so,
where are its eyes? Did it jump into my brain? If so, where are its
legs? Please explain this to me.
Nutty.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10 1FF7 7F13 8180 B6B6'])
#== New Book: MacPerl: Power and Ease ==#
#== Publishing Date: Early 1998. http://www.ptf.com/macperl/ ==#
------------------------------
Date: Tue, 14 Apr 1998 14:18:23 GMT
From: toriw@online.no (Tor Iver Wilhelmsen)
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <353d6bc6.7236729@news.eunet.no>
On 14 Apr 98 06:36:26 GMT, borchert@turing.mathematik.uni-ulm.de
(Andreas Borchert) uttered:
>Sometimes the associated reference documentation is in separate files,
>sometimes it is even mixed with the program code (see embedded POD for
>Perl, for example). Independent from this, it is an integral part of
>software.
But the presence of non-free documentation (such as O'Reilly's books)
does not prevent the existence of free documentation (the generated
documentation in whatever format pod2X generates).
--
"Between our dreams and actions lies this world."
- Bruce Springsteen, "Dead Man Walking"
Tor Iver Wilhelmsen toriw@online.no
------------------------------
Date: Tue, 14 Apr 1998 09:22:38 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <3533712E.ADECDA5E@mindspring.com>
Chris Nandor wrote:
>
> In article <slrn6j4kog.4hf.wnoise@puree.ugcs.caltech.edu>,
> wnoise@ugcs.caltech.edu wrote:
>
> # Not to put too fine a point on it, but while information does not long
> # to be free, it is a useful approximation to consider it as if it did.
>
> Apologies, but I rarely consider it useful to consider something as true
> that which is not.
>
I'd be willing to bet that you do it every day. Do you ever refer to
"the sun rising"? Does it really? A "blue sky"? Tell me, where is
this blue that is inherent in the sky?
Y'know, Chris, ultimately it's all simplifying fictions. What's
ultimate reality? Quarks? Strings? You yourself are almost entirely
"empty" space. If you "touch" something, no particle making up your
body actually "touches" another. We're dealing with the repulsive force
between the electron clouds surrounding the nuclei of the atoms of the
things "touching".
[cut]
> Unicellular creatures may not have desire as we know it, but they
> certainly have some sort of inherent drive to survive. They move toward
> that which keep them alive, and shirk away from perceived threats.
> Information does no such thing. It sits in a leather binding or on a
> floppy disk and does nothing one way or another to survive or prevent
> extinction.
>
Good point, actually. The closer analogy, rather than to unicellular
creatures, would be to viri, which don't really do anything without the
aid of the host. In fact, "sits in a leather binding" reminds me a lot
of viri in their protein coats...
Of course, viri are said to "evolve", implying they are doing something,
rather than being passively selected, which would seem to be the real
case. It's just a shorthand to help us human beings think easily about
what's going on. We think more easily in terms of beings with wills,
"driving force", what have you. Simplifying fictions, again.
(I think talking about software "wanting to be free" is at least
defensible as such a simplifying fiction, but may not work for some).
It was common practice at a company I worked for to refer to programs as
"he". Made it easier to visualize the interactions. ("At that point,
he wants a keystroke from the user.") It just made it that tiny bit
easier to "get inside" the program, by identification. (Try it some day
in your conversations about some sort of program interaction, as a
thought experiment). Did we think the programs actually had gender or
will? *Not*.
------------------------------
Date: Tue, 14 Apr 1998 10:49:17 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <pudge-1404981049340001@ppp-3.ts-1.kin.idt.net>
In article <3533712E.ADECDA5E@mindspring.com>, keithmur@mindspring.com wrote:
# Chris Nandor wrote:
# > Apologies, but I rarely consider it useful to consider something as true
# > that which is not.
# >
# I'd be willing to bet that you do it every day. Do you ever refer to
# "the sun rising"? Does it really? A "blue sky"? Tell me, where is
# this blue that is inherent in the sky?
Well, I would argue that thise are true, based on our senses.
# Y'know, Chris, ultimately it's all simplifying fictions.
You make a very good point. I have no problem with saying something that
is not true for simplicity's sake so long as we all know it is not true.
But in this case, many people think that information actually does will
and act.
# (I think talking about software "wanting to be free" is at least
# defensible as such a simplifying fiction, but may not work for some).
I agree. I am just guarding against the notions that information in
actuality desires something, or does something, anything, at all.
Thanks for your post.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10 1FF7 7F13 8180 B6B6'])
#== New Book: MacPerl: Power and Ease ==#
#== Publishing Date: Early 1998. http://www.ptf.com/macperl/ ==#
------------------------------
Date: Tue, 14 Apr 1998 09:55:53 -0400
From: Jay Flaherty <fty@utk.edu>
To: Chris Winters <cwinters@intes.net>
Subject: Re: Book: Perl Modules
Message-Id: <35336AE9.5D4A3CF7@utk.edu>
Chris Winters wrote:
> I'm curious to learn more about creating modules (beyond the
> excellent documentation with Perl, of course) and thought this might
> be a way to go.
Get:
Advanced Perl Programming - Sriram Srinivasan (O'Reilly & Associsates,Inc.)
Perl - The Programmer's Companion - Nigel Chapman (John Wiley & Sons)
Also, Randal Schwartz has some nice columns (column 13 & 14) from Unix Review
at:
http://www.stonehenge.com/merlyn/UnixReview/
Finally, there is Tom C's perltoot at:
http://www.perl.com/CPAN-local/doc/FMTEYEWTK/perltoot.html
or simply man perltoot
Jay
------------------------------
Date: Tue, 14 Apr 1998 14:18:24 GMT
From: toriw@online.no (Tor Iver Wilhelmsen)
Subject: Re: environnemt variables
Message-Id: <353e6d14.7571337@news.eunet.no>
On Tue, 14 Apr 1998 09:35:36 +0200, N i c l a s O l o f s s o n
<gurun@acc.umu.se> uttered:
>IMO the original poster committed a CGI/Perl question.
No. It was a SSI/HTML-question. The answer,
<!--#exec cgi="myscript.pl" -->
has not a single bit of Perl in it, other than possibly the file
extension.
--
"Between our dreams and actions lies this world."
- Bruce Springsteen, "Dead Man Walking"
Tor Iver Wilhelmsen toriw@online.no
------------------------------
Date: 14 Apr 1998 14:27:07 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: environnemt variables
Message-Id: <6gvrnr$bo9$1@client2.news.psi.net>
Grinch (grinch@whoville.com) wrote on MDCLXXXVII September MCMXCIII in
<URL: news:6gv5vg$8pl@fridge.shore.net>:
++ Craig Berry wrote in message <6gu5cd$bhc$2@marina.cinenet.net>...
++
++ >N i c l a s O l o f s s o n (gurun@acc.umu.se) wrote:
++
++
++ >The original poster (like so many others) committed an error similar to
++ >entering a library and asking where the frozen foods section was located.
++ >Is it truly so rude to redirect such a person to the supermarket next
++ >door, rather than simply ignoring them and letting them wander around
++ >without hope of success?
++
++
++ I agree with you in general, but there are degrees. "No frozen foods here,
++ but you can find them in the supermarket, which is a block down the street
++ on your right" is a very different statement than "That's not a library
++ question, so get out of the library." One is helpful, the other isn't.
++ Personally, I wonder why the people posting non-answers in the latter style
++ even bother wasting their time with it. If they don't want to help, they
++ should just ignore the post.
If people are told "this is a CGI question, this is not a CGI group"
and are uncapable of grepping for cgi in their list of newsgroups,
I don't give them much hope that any answer will satisfy them.
I assume people looking for the frozen food section know they can find
that in a supermarket, they mistake the library for a supermarket.
Apperently, you don't give them that credit.
BTW, if you don't like my answers, ignore them.
Abigail
--
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT
------------------------------
Date: 14 Apr 1998 11:36:39 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Error number Help wanted
Message-Id: <6gvvq7$g1$1@monet.op.net>
Keywords: asynchronous Hamburg ligament pedagogic
In article <6gvk5e$sf2$1@juliana.sprynet.com>, <romei@sprynet.com> wrote:
>I'm writing a perl pgm in perl 5.001 in a unix envir and keep getting
>a "error number 8" in my system error log. I can find no reference to
>any error numbers anywhere.
I can think of three or four things that this *might* mean, and on the
other hand it might not mean any of those things. Without knowing
what program is printing this message, it is impossible to begin
investigating this problem. A program might print `error number 8'
unter any circumstances at all, depending on the program.
Is this message coming from Perl itself? Or is it being printed by
your Perl script? Or by some other program?
------------------------------
Date: Tue, 14 Apr 1998 15:45:38 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Getting the name of an SMTP server
Message-Id: <Pine.A41.3.95a.980414152013.122198G-100000@rsplus15.cern.ch>
On Tue, 14 Apr 1998, Hakon Steinx wrote:
> How does one get the name of an SMTP server from the network name in an
> email address ?
That's not a perl language question. You would need to review DNS
MX records.
> I want to do this in order to verify email addresses.
You can't reliably verify email addresses. That isn't a perl language
question either, but in spite of that, it's asked so often that the perl
FAQ contains an entry explaining why ("perldoc perlfaq" tells me that
it's in FAQ part 9. And indeed "perldoc perlfaq9" contains an entry
"How do I check a valid email address?", the answer "you can't", and a
lot of instructive discussion.
> In order to do
> this i need to connect to the remote host and ask him.
And some servers will say yes to every question. And some will refuse
to answer.
------------------------------
Date: 14 Apr 98 14:43:43 GMT
From: root@ (root)
Subject: how to parse "this", "that", "other"
Message-Id: <scott.892565023@hallux>
Keywords: parse split
I have an ascii database with an arbitrary number of comma delimited,
possibly double-quote enclosed fields. Is there a clever way to parse
this with a single regex?
$dat = '"this","that and","the other",565,"sdf",etc';
@fields = split(/\"*,\s*\"*/, $dat);
doesn't do what I want.
------------------------------
Date: 14 Apr 1998 11:30:35 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: how to parse "this", "that", "other"
Message-Id: <6gvver$bv$1@monet.op.net>
Keywords: parse split
In article <scott.892565023@hallux>, root <root@> wrote:
>I have an ascii database with an arbitrary number of comma delimited,
>possibly double-quote enclosed fields. Is there a clever way to parse
>this with a single regex?
There is a way, but it's not clever.
You should get the Text::CSV module; it does what you want already.
------------------------------
Date: Tue, 14 Apr 1998 10:41:23 -0600
From: scott@md.hscbklyn.edu
Subject: how to parse a "this", "that", "and the ", "other" file
Message-Id: <6h0033$94m$1@nnrp1.dejanews.com>
I have an ascii database with an arbitrary number of comma delimited,
possibly double-quote enclosed fields that I would like to parse using split
(). One record per line.
e.g.
"red", 4, "38", large, *
"blue", 4, "22", small,
"green,blue", 3, "2", small, *
Can someone help me come up with an appropriate regex?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Tue, 14 Apr 1998 14:13:50 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
To: "Grinch" <grinch@whoville.com>
Subject: Re: How to read systemcommand value to a variable?
Message-Id: <8c4szwqyo6.fsf@gadget.cscaper.com>
>>>>> "Grinch" == Grinch <grinch@whoville.com> writes:
Grinch> Use backticks, like this:
Grinch> $a = `finger|grep 75727`;
And that would be further optimized in my programs to:
@found = grep /75727/, `finger`;
No need to waste a Unix process to do a little text manipulation. That's
where Perl excels!
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 140 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 14 Apr 1998 11:33:05 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: i want to learn Perl. HELP!
Message-Id: <6gvvjh$dl$1@monet.op.net>
Keywords: Chilean Ellison treasure vagabond
In article <6gvcbv$qdr$1@gaia.ns.utk.edu>,
Bob Gwynne <gwynne@utkux.utk.edu> wrote:
>Despite what the others say about the Camel & Llama books, I've found that
>Jon Ormont's Perl 5 Interactive Course is the best all around tutorial.
>Make sure to get the second (certified) edition, however. The first is full
>of editorial errors.
The author is Jon Orwant.
------------------------------
Date: 14 Apr 1998 14:36:24 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: info on cookies
Message-Id: <6gvs98$bo9$3@client2.news.psi.net>
Gilles Chong (glchy@csah.com) wrote on MDCLXXXVII September MCMXCIII in
<URL: news:35332C56.7433130D@csah.com>:
++ Hi,
++ im playing with cookies for the moment. Generating them with a
++ javascript is very simple. But im stuck when it comes to getting the
++ cookie and reading it in Perl. It seems that there is NOT an env
++ variable which corresponds to the cookie.
Then that's a problem you have to take up with your server, not with Perl.
Abigail
--
perl -pwle '$_ .= reverse'
------------------------------
Date: Tue, 14 Apr 1998 10:12:19 -0400
From: "Bob" <bmalik@geocities.com>
Subject: Ksh to Perl conversion
Message-Id: <6gvq1q$j3v$1@charm.magnus.acs.ohio-state.edu>
How do I convert the following ksh script to perl ??
#!/usr/bin/ksh
ftp -niv <<!
open ${server}
user ${user} ${password}
cd '${filepath}'
get ${filename} ${downloadfilepath}/$filename
bye
!
Please respond to bmalik@geocities.com
Thanks.
Bob
------------------------------
Date: 14 Apr 1998 14:04:11 GMT
From: lvirden@cas.org
Subject: Re: Perl 5.004_64 Slower???
Message-Id: <6gvqcr$cel$4@srv38s4u.cas.org>
According to Bill 'Sneex' Jones <sneaker@mediaone.net>:
:Given the following code -
:
:#!perl -w
:use strict;
:use diagnostics;
:
:my $string = "This is a simple string.";
:my $retStr = '';
:my $chopAmt = 4;
:
:$retStr = substr(reverse($string), 0, (0 - $chopAmt));
:$retStr = reverse($retStr);
:
:print "$retStr\n", (0 - $chopAmt), "\n";
:
:
:Why is it SO SLOW???
:
:Is perl 5.004_64 slower???
Yes, it is. I am using perl 5.004_64 on a SPARC 4 with lots of memory,
Sun's compiler with lots of optimization at compile time.
When I ran the script above using an old version of perl (5.004_01) I got
times of 3.82/2.16/0.50, 2.64/2.17/0.35, 2.62/2.16/0.37 using the time
command.
Then, using perl 5.004_64 gives me times of 8.28/5.29/0.40, 5.81/5.29/0.30,
and 5.72/5.27/0.36 .
Looks like the system times are in the same ball park, but user time is
about twice as slow. Note this has _nothing_ to do with threading compiled
in - I wasn't able to get the threading code to compile in my environment
the last time I tried.
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Fri, 10 Apr 1998 16:00:07 -0400
From: "Bill Hess" <brhess@email.msn.com>
Subject: Perl and DOS Console on Win32
Message-Id: <OFqKJ0LZ9GA.202@uppubnews03>
I am running Perl 5.004_04 on WinNT/Win95 and I need to run a Perl Program
with no DOS Console window popping up - how can I do this???
------------------------------
Date: Tue, 14 Apr 1998 16:49:01 +0000
From: Andres Maehlmann <andres@gch.med.uni-muenchen.de>
Subject: PERL for SINIX 5.43 (RM300)?
Message-Id: <35339371.1DC6D63A@gch.med.uni-muenchen.de>
Hi all,
has anyone successfully installed PERL 5 in a SINIX-Environment?
Any hint is wellcome.
A. Maehlmann
University of Munich
------------------------------
Date: Tue, 14 Apr 1998 00:12:18 -0700
From: "Richard Porter " <rlp6@cornell.edu.nospam>
Subject: Perl writes to DOS window instead of browser
Message-Id: <01bd6774$56d04940$aa032399@cu-dialup.cornell.edu>
Hi,
I am using PERL 5.003 on Windows 95 using Personal Web Server (IIS) and IE
3.02.
I am beginning to learn PERL and CGI (as may be obvious). I have set up a
simple PERL script from Sol and Birznieks book which outputs HTML. I access
the script from a link on a standard HTML page. The script executes,
however it outputs to the DOS window instead of to my browser. Can anyone
tell me what is happening here and how to get the PERL script to output to
the browser instead?
Thanks.
Richard
------------------------------
Date: Tue, 14 Apr 1998 09:51:07 -0500
From: gold_bag@yahoo.com
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl, HP-UX, and memory ...
Message-Id: <353377DB.51B3@yahoo.com>
You say Linux on HP's PA-RISC?? Is linux ported to PA-RISC??
Tom Phoenix wrote:
>
> On 14 Apr 1998 wvw@fred.net wrote:
>
> > I'm running perl 5.04-1 on an HP-UX platform, with a script that reads
> > in a 1.3 meg file. The script does massive string substitutions and the
> > virtual memory usage peaks at about 60 meg VM. I have been very careful
> > to "my" all variables and "undef" the rest. The problem is that near
> > the end of the script it is necessary to do a :
> >
> > system("tar -cf ...")
> >
> > Even though Perl has lots of memory to work with, the OS evidently can't
> > get enough to create a subshell and the "system" fails.
> >
> > Does anyone know how to REALLY get Perl to release memory to the
> > kernel???
>
> Fix the kernel to make it possible for Perl to give memory back. :-) It
> does give memory back on systems which allow this, such as Linux. Failing
> that, you may wish to use exec instead of system, or to re-exec your
> script itself, or to buy more memory, or to enlarge your system's virtual
> memory, or to install Linux... :-) TMTOWTDI!
>
> Hope this helps!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 14 Apr 1998 11:14:52 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Project involving Word
Message-Id: <6gvuhc$8f$1@monet.op.net>
In article <6gtljt$phj$1@samba.rahul.net>,
Anirvan Chatterjee <c..bojswbo@04.usenet.us.com> wrote:
>Mark-Jason Dominus <mjd@op.net> wrote:
>> I don't think there are any, because Microsoft never tells anyone what
>> their file formats are.
>
>This is wrong.
Thanks for the correction. I'm really glad to learn that I was
mistaken about this.
I wasn't able to find the information I wanted on the site, but I
think that's because their site is broken, and not because they
weren't willing to divulge it.
------------------------------
Date: Tue, 14 Apr 1998 15:34:58 GMT
From: FHeasley@chemistry.com (Frank)
Subject: Re: Project involving Word
Message-Id: <353981ca.92688004@news.halcyon.com>
On Fri, 10 Apr 1998 10:27:36 -0700, Mcoe NT <root@mail.mcoe.k12.ca.us>
wrote:
>Hello group,
>
>I have a project where i need to parse a scanned doc and insert the
>whatever ( I say "whatever" because I am not sure what they are) to turn
>this doc into a word template file as a word form. This way my client
>can scan docs in, turn them into word forms, fill them in and print them
>or whatever. Does any one know of any modules that will allow me to
>control word in this way.
>
>Thanks. joseph.
>
Unless I'm missing something, you don't need perl to do this. Just
scan the document into WORD, then save it as a template.
If you need to reformat it, you can use a WORD macro to do so and then
save it for you.
Frank
Frank
------------------------------
Date: Tue, 14 Apr 1998 14:17:07 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
To: Justin Wills <justin@nectar.com.au>
Subject: Re: Remove newline
Message-Id: <8czphopjy9.fsf@gadget.cscaper.com>
>>>>> "Justin" == Justin Wills <justin@nectar.com.au> writes:
Justin> try:
Justin> @file=<STDIN>
Justin> chomp @file;
Or even:
chomp (@file = <STDIN>);
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 140 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Tue, 14 Apr 1998 16:35:49 +0200
From: Johannes Keukelaar <johannes@nada.kth.se>
Subject: Returning an array from an XS routine?
Message-Id: <35337444.674BC10@nada.kth.se>
Hello all,
I am trying to write a Perl extension that features an XS function
that will return a list (or is that an array? This perlminology always
gets me confused). There are some functions that I call to obtain
elements of the list. Basically, what I have looks like this:
void
shown( )
PREINIT:
int n, done;
Layer *layer;
PPCODE:
for ( n = 0, done = 0; ! done; n++ )
{
if ( ( layer = Layer_Get( n ) ) )
{
EXTEND( sp, 1 );
PUSHs( sv_newmortal( ) );
printf( "A layer at 0x%p.\n", layer );
sv_setref_pv( ST( 0 ), "LayerPtr", ( void* )layer );
Layer_Ref( layer );
}
else
done = 1;
}
Layer_Get is the function that returns the nth element of a list (yes, I
know this is inefficient, but that's not the point). Layer_Ref keeps
track of the reference count of the Layer.
What's wrong with this function? The print statement prints two layers
(which seems correct), but the return value of the function only
contains one element.
Grateful for help,
Johannes.
------------------------------
Date: 14 Apr 1998 10:11:04 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: SOLVED: qx scalar returned in a list context
Message-Id: <4szwsak7.fsf@mailhost.panix.com>
[posted and mailed to rootbeer]
Tom Phoenix <rootbeer@teleport.com> writes:
> On 13 Apr 1998, James B. Crigler wrote:
> > Binary "||" performs a short-circuit logical OR operation.
> > That is, if the left operand is true, the right operand is
> > not even evaluated. Scalar or list context propagates
> > down to the right operand if it is evaluated.
> >
> > Assuming I missed it in the documentation (which is likely), where
> > should I have looked?
>
> I'm not sure what you missed. Was it that || supplies a scalar context to
> its left operand? Or the precedence chart, which is in perlop?
I can see where the docs are unclear: It says, explicitly, in the
quoted passage, that list context can be propagated to the right
operand, implying that the left operand is sometimes evaluated in list
context. We'd benefit from a clarification, if you (rootbeer) or one
of the other gurus would care to step in.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Tue, 14 Apr 1998 14:10:45 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
To: Digital Puer <digital_puer@hotmail.com>
Subject: Re: where are the examples in the newer (blue) camel book?
Message-Id: <8c90p8qytb.fsf@gadget.cscaper.com>
>>>>> "Digital" == Digital Puer <digital_puer@hotmail.com> writes:
Digital> This is probably old hat. I just bought the blue camel book
Digital> "Programming Perl" after owning the older edition for the
Digital> longest time (I had gotten my perl 5 info off the net). I was
Digital> greatly disappointed that the new edition does not have a
Digital> section of examples like the older edition. The examples
Digital> of "common problems" was what got me into perl in the first
Digital> place.
As I was shepherding the new Camel through the final months of writing
(as lead writer), I had to make some tradeoffs given the limited
resources we had. We didn't have the writing or editing staff to do
both the module library doc *and* update the Real Programs section.
So, I leaned towards the module docs.
Some have argued with my decision, but it's the way I called it.
In an ideal world, we would have done both.
Same thing for the "Common Tasks"... it fell below the resource
cutline. *That* section is seeing the light of day in a forthcoming
book, though. (I hope I'm not revealing too much there... :-)
(Besides, I couldn't rightly put out another Perl book that used
the "g___" operator... :-)
Digital> Are these examples in the new "Learning Perl" book?
No. The llama/gecko has its own examples, but very few complete
practical programs (unless you look at the exercise answers).
Digital> If not, are they online somewhere?
Those examples, and *thousands* more, are found all over the Net. :-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 140 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Tue, 14 Apr 1998 15:41:20 GMT
From: gerlach@netcom.com (Matthew H. Gerlach)
Subject: Re: Which Win32 Perl
Message-Id: <gerlachErEu8w.DH9@netcom.com>
In addition to the two versions you mention, there is DJGPP port of perl,
www.delorie.com/djgpp/. DJGPP is 32 bit dos protected mode port
of GCC and most of the other gnu tools. Recently, I noticed someone built
perl5.004 using the djgpp.
Like all the DJGPP tools, the perl port supports looooooong command lines.
This has been of particular interest to me since I use a few perl scripts
in my software compile process. My makedepend perl script, like the X11 tool,
benefits from long command lines due to cacheing of dependencies.
Since its built with djgpp's gcc, and appears to have all the stuff for
making modules, I imagine it would be a nice evironment to glue C code
into perl.
Matthew
In article <35336299.320098218@news.frii.com> rob@frii.com (Rob Greenbank) writes:
>I noticed the other day there are now two choices (besides building it
>yourself) for Perl on the Win32 platform, both with links on the page
>"www.perl.com/latest.html".
>
>I've read the description of the differences between "Active State"
>and "Gurusamy Sarathy's" versions. I like the sounds of GS's, but
>before I blow away my "Active State" version I'd like to know if
>anyones had any problems with GS's. Also, anyone had problems
>switching between the versions?
>
>Thanks,
> Rob Greenbank
> (rob@frii.com)
>
------------------------------
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 2317
**************************************