[12860] in Perl-Users-Digest
Perl-Users Digest, Issue: 270 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 27 11:15:26 1999
Date: Tue, 27 Jul 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)
Perl-Users Digest Tue, 27 Jul 1999 Volume: 9 Number: 270
Today's topics:
Re: Beginner-friendly group as cultural adaptation? <Armin.Faltl@siemens.at>
Re: beginner-redirect and download (Abigail)
Re: beginner-redirect and download (Andreas Fehr)
cgi HTTP header information <richard.garside@zen.co.uk>
cgi HTTP header information <richard.garside@zen.co.uk>
cgi HTTP header information <richard.garside@zen.co.uk>
cgi HTTP header information <richard.garside@zen.co.uk>
cgi HTTP header information <richard.garside@zen.co.uk>
converting net address... <gemal@dk.net>
Re: converting net address... (Randal L. Schwartz)
Re: cross platform perl, how is done (Abigail)
Re: Custom HTML functions - I could use some direction, (Abigail)
Re: FormMail Year 2000 problem (I R A Darth Aggie)
Re: FormMail Year 2000 problem (Anno Siegel)
Re: Geekspeak Programming Contest <keithmur@mindspring.com>
Re: Getting page title <jcarrio@imagelink.com.br>
Re: Getting page title <jcarrio@imagelink.com.br>
Re: HTML::Parser sample (Steve van der Burg)
Re: Korn Shell or Perl? (Dan Mercer)
Re: Newbie needs help: Environment variables (Abigail)
Re: newbie question: system ()/error message spicastretford@my-deja.com
Re: Orwant book status? (was Re: stopping email) (Abigail)
Re: Orwant book status? (was Re: stopping email) (I R A Darth Aggie)
Re: paragraph breaks in text? <breville@mpce.mq.edu.au>
Re: perl to interpret a XLS file? <rcadmus@amctheatres.com>
question on times function (Anno Siegel)
Re: reg expression <flavell@mail.cern.ch>
Re: reg expression llornkcor@my-deja.com
Re: reg expression <aperrin@mcmahon.qal.berkeley.edu>
Re: stopping email overflow on failure (I R A Darth Aggie)
Re: stopping email overflow on failure (Andreas Fehr)
Re: Which group is appropriate? <tchrist@mox.perl.com>
Re: Which group is appropriate? <toby@venice.cas.utk.edu>
Re: Win32::EventLog (Larry Rosler)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 27 Jul 1999 15:56:56 +0200
From: Armin Faltl <Armin.Faltl@siemens.at>
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <379DBAA8.290B43F4@siemens.at>
John Callender wrote:
> I'm curious why people think no one who knows anything will answer
> newbie questions in a newbie group.
I'm reading c.l.p.m occasionally, especially if I try to find
answers for my own questions.
Though I did answer some questions, if I thought that
problem was interessting or the poster showed some
good will to solve his/her problem on his own or at least
appologised for not doing so.
That's why I wouldn't look in a newbie group!
Regards,
--
* D.I. Armin Faltl --------- *
* email: Armin.Faltl@siemens.at | | *
* work phone: +43-1-1707-46429 |--|- *
------------------------------
Date: 27 Jul 1999 09:08:00 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: beginner-redirect and download
Message-Id: <slrn7prf93.1mc.abigail@alexandra.delanet.com>
Paul Huckstepp (ph@alternativerealities.co.uk) wrote on MMCLVI September
MCMXCIII in <URL:news:379d7892@news.intensive.net>:
## Hi,
##
## Is it possible to tell a browser to download a file and redirect the browser
## to another URL, or in failing that, open a new window that prompts the
## download and send the original window to a new URL?
Hi,
is it possible to tell a penguin to catch a fish and redirect the penguin
to another iceberg, or in failing that, man a new ship that starts the
fishing and send the original ship to a new iceberg?
Your question isn't only poorly phrased, it shows a lack of knowledge
on how the web works. But most of all, it's completely off topic here.
Go away.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Tue, 27 Jul 1999 14:14:18 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: beginner-redirect and download
Message-Id: <379dbe41.17150340@news.uniplus.ch>
On 27 Jul 1999 09:08:00 -0500, abigail@delanet.com (Abigail) wrote:
>
>is it possible to tell a penguin to catch a fish and redirect the penguin
>to another iceberg, or in failing that, man a new ship that starts the
>fishing and send the original ship to a new iceberg?
>
Ever thought of writing a book? I love these answers!
Andreas
------------------------------
Date: Tue, 27 Jul 1999 16:02:06 +0100
From: "Richard Garside" <richard.garside@zen.co.uk>
Subject: cgi HTTP header information
Message-Id: <_Pjn3.19476$nW3.1796@newreader.ukcore.bt.net>
Hi,
I have a cgi script that will be used by several users. It is a
sitesearching tool. It works fine but the problem is that at present anyone
using it can search through the directories of other people hosted on our
server. I want to find the path location of the pge that calls my script so
I can check they aren't trying to access other users sites.
I tried using HTTP_REFERER which did work but some of our users have domains
which are on virtual servers. Is there any header I can use to find the
physical location on the server of the page calling the script.
Thanks,
Richard.
------------------------------
Date: Tue, 27 Jul 1999 16:02:06 +0100
From: "Richard Garside" <richard.garside@zen.co.uk>
Subject: cgi HTTP header information
Message-Id: <vQjn3.19477$nW3.1783@newreader.ukcore.bt.net>
Hi,
I have a cgi script that will be used by several users. It is a
sitesearching tool. It works fine but the problem is that at present anyone
using it can search through the directories of other people hosted on our
server. I want to find the path location of the pge that calls my script so
I can check they aren't trying to access other users sites.
I tried using HTTP_REFERER which did work but some of our users have domains
which are on virtual servers. Is there any header I can use to find the
physical location on the server of the page calling the script.
Thanks,
Richard.
------------------------------
Date: Tue, 27 Jul 1999 16:02:06 +0100
From: "Richard Garside" <richard.garside@zen.co.uk>
Subject: cgi HTTP header information
Message-Id: <5Rjn3.19478$nW3.1801@newreader.ukcore.bt.net>
Hi,
I have a cgi script that will be used by several users. It is a
sitesearching tool. It works fine but the problem is that at present anyone
using it can search through the directories of other people hosted on our
server. I want to find the path location of the pge that calls my script so
I can check they aren't trying to access other users sites.
I tried using HTTP_REFERER which did work but some of our users have domains
which are on virtual servers. Is there any header I can use to find the
physical location on the server of the page calling the script.
Thanks,
Richard.
------------------------------
Date: Tue, 27 Jul 1999 16:02:06 +0100
From: "Richard Garside" <richard.garside@zen.co.uk>
Subject: cgi HTTP header information
Message-Id: <jSjn3.19479$nW3.1831@newreader.ukcore.bt.net>
Hi,
I have a cgi script that will be used by several users. It is a
sitesearching tool. It works fine but the problem is that at present anyone
using it can search through the directories of other people hosted on our
server. I want to find the path location of the pge that calls my script so
I can check they aren't trying to access other users sites.
I tried using HTTP_REFERER which did work but some of our users have domains
which are on virtual servers. Is there any header I can use to find the
physical location on the server of the page calling the script.
Thanks,
Richard.
------------------------------
Date: Tue, 27 Jul 1999 16:02:06 +0100
From: "Richard Garside" <richard.garside@zen.co.uk>
Subject: cgi HTTP header information
Message-Id: <sUjn3.19480$nW3.1858@newreader.ukcore.bt.net>
Hi,
I have a cgi script that will be used by several users. It is a
sitesearching tool. It works fine but the problem is that at present anyone
using it can search through the directories of other people hosted on our
server. I want to find the path location of the pge that calls my script so
I can check they aren't trying to access other users sites.
I tried using HTTP_REFERER which did work but some of our users have domains
which are on virtual servers. Is there any header I can use to find the
physical location on the server of the page calling the script.
Thanks,
Richard.
------------------------------
Date: Tue, 27 Jul 1999 15:41:31 +0200
From: Henrik Gemal <gemal@dk.net>
Subject: converting net address...
Message-Id: <379DB70A.C8F26E64@dk.net>
Could anybody give me a line (or two) that can convert the following
text links into html links.
The text is:
"this is text www.gemal.dk with links
more text www.gemal.dk/test more links
bla bla http://www.gemal.dk blabla
bla bla http://www.gemal.dk/test blabla
bla bla http://test.gemal.dk blabla
bla bla http://test.gemal.dk/test blabla
"
I would like to convert all the possible links in the text into valid
HTML links, that's <A HREF= bla bla bla...
I need it for a application so an external program like txt2html wont
work!
--
Henrik Gemal, gemal@dk.net
Network Innovator
http://www.gemal.dk
------------------------------
Date: 27 Jul 1999 08:00:26 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: converting net address...
Message-Id: <m1iu76b0j9.fsf@halfdome.holdit.com>
>>>>> "Henrik" == Henrik Gemal <gemal@dk.net> writes:
Henrik> The text is:
Henrik> "this is text www.gemal.dk with links
Henrik> more text www.gemal.dk/test more links
Henrik> bla bla http://www.gemal.dk blabla
Henrik> bla bla http://www.gemal.dk/test blabla
Henrik> bla bla http://test.gemal.dk blabla
Henrik> bla bla http://test.gemal.dk/test blabla
Henrik> "
Henrik> I would like to convert all the possible links in the text into valid
Henrik> HTML links, that's <A HREF= bla bla bla...
You really don't want all *possible* links... you'll end up with:
<a href="b">b</a><a href="l">l</a><a href="a">a</a> ...
since "b" and "l" and "a" are possible links. Heck, even the null
string is a possible link.
I don't say this to be stupid. Half the problem in writing a program
is getting the specfication proper enough. The other half is fighting
bugs in the language, although for Perl, that's thankfully avoided.
(That's why we Perl hackers gets things done twice as fast.)
As soon as you can accurately state what a "possible link" is in,
preferably, a regular expression (hint hint), your job will be mostly
done.
Also note that you are reinventing various wheels. There are txt2html
translators out there. In particular, I'm a heavy user of MHonArc,
which takes a mail message and makes a nice web page from it,
extracting interesting links. I believe MHonArc is in the CPAN.
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: 27 Jul 1999 09:10:03 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: cross platform perl, how is done
Message-Id: <slrn7prfcv.1mc.abigail@alexandra.delanet.com>
bodhyfryd@my-deja.com (bodhyfryd@my-deja.com) wrote on MMCLVI September
MCMXCIII in <URL:news:7njta4$rp1$1@nnrp1.deja.com>:
()
() MY QUESTION is: what advice can you lot give on how and what is needed
() to develop platform independent perl cgi? and are all the CPAN modules
() etc available for this.
man perlport
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 27 Jul 1999 09:13:10 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Custom HTML functions - I could use some direction, hints, help! :-)
Message-Id: <slrn7prfiq.1mc.abigail@alexandra.delanet.com>
Chris (cnlsilva@gte.net) wrote on MMCLVI September MCMXCIII in
<URL:news:37a43e0a.9740708@news.gte.net>:
,, 1st I have created a script like this and 2nd so have a million other
,, people. I also had a hell of a time trying to find this very simple
,, little snippet of Regex code:
,,
,, you can probably use:
,,
,, $string =~ s/<poll>(.*?)<//poll>/$replacement_string/sg;
That looks like a syntax error to me.
,, I use this to replace between comments like
,, <!--begin main body text--> and
,, <!--end main body text-->
,, enjoy ;)
,,
,,
,, I am attempting to modify a script to allow a HTML page to be updated
,, dynamically. I want to use a custom tag <poll> and </poll> to allow
,, ew information to be updated to the page in a easy to use manner.
Then it's no longer HTML of course.
,, I have Mastering Regular Expressions and Programming Perl and was not
,, able to find a model in which a string\output was put inbetwent two
,, tags located anywhere in a file - any help or direction???
It's posted in this group about 43 times a day that regexes are a poor
tool when it comes to modifying HTML based on tags.
Please consider reading a few posts in this group - then the answer will
be revealed.
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 27 Jul 1999 13:34:01 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: FormMail Year 2000 problem
Message-Id: <slrn7prdee.b5m.fl_aggie@thepentagon.com>
On Tue, 27 Jul 1999 00:47:07 GMT, Alan Curry <pacman@defiant.cqc.com>, in
<fk7n3.6107$cO4.163438@news12.ispnews.com> wrote:
+ In article <slrn7ppt0e.80l.fl_aggie@thepentagon.com>,
+ I R A Darth Aggie <fl_aggie@thepentagon.com> wrote:
+ >I'm open to suggestions regarding the mail API. IMHO, I think the easiest
+ >solution is to bypass the local MTA and talk directly to the localized
+ >SMTP server.
+ /usr/lib/sendmail is the standard mail injection interface.
Even under NT?
+ I don't think the FormMail problem is big enough to justify using modules.
Then go do what you want, but count me out.
+ If it prints dates wrong a few months from now, I don't really care. The
+ reason I want this thing replaced is that it is an anonymous public mail
+ relay, and that makes it evil.
That's a configuration issue. Besides, how difficult will it be to
hack what you plan to do and turn it into an anonymous relay?
James
------------------------------
Date: 27 Jul 1999 15:04:54 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: FormMail Year 2000 problem
Message-Id: <7nkhqm$9cg$1@lublin.zrz.tu-berlin.de>
I R A Darth Aggie <fl_aggie@thepentagon.com> wrote in comp.lang.perl.misc:
>On Mon, 26 Jul 1999 20:45:55 +0100, Simmo <simsi@hotmail.com.nospam>, in
><hV2n3.28$LH1.6488@news.enterprise.net> wrote:
>
>+ Just a quick note - hope it hasnt been covered here but if you use FormMail
>+ from Matt Wrights Script Archive like what i does (!) and its over a year or
>+ so old (haven't checked latest versions), you may find this line in it:
>
>The latest greatest edition is y2k compliant:
>
> $year += 1900;
> # Format the date. #
> $date = "$days[$wday], $months[$mon] $mday, $year at $time";
>
>That would be version 1.6.
What? No more escaping the colons? I am *so* disappointed.
Anno
------------------------------
Date: Tue, 27 Jul 1999 09:21:59 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Geekspeak Programming Contest
Message-Id: <379DC087.9F30D0FB@mindspring.com>
Anno Siegel wrote:
>
> Keith G. Murphy <keithmur@mindspring.com> wrote in comp.lang.perl.misc:
> >Anno Siegel wrote:
> >>
> >[cut]
> >> Conceptually, I'd say a programming mistake is an error in
> >> algorithm, i.e. applying an algorithm that doesn't solve the
> >> problem at hand.
> >>
> >> A bug is an error in implementation, i.e. using an algorithm
> >> that would solve the problem, but failing to implement it
> >> correctly.
> >>
> >> Of course, this distinction is of little empirical value, because
> >> it depends on the programmers state of mind, absent additional
> >> evidence. Seeing the line
> >>
> >> $sum_of_squares = $n*( $n - 1);
>
> This should have been $sum_of_integers = ..., as Larry has pointed
> out.
>
> >> we don't know if the programmer misremembered his math (programming
> >> error) or if he forgot to type in /2 (bug).
> >>
> >> Anno
> >So the continuum runs like this?
> >
> >programming mistake ----> bug ------> typo
> > AKA
> > "brain fart"
>
> No. Typos are a frequent cause of bugs, but the result is a bug
> nonetheless.
How to do Venn diagrams in ASCII, showing typos as a subset of bugs,
bugs disjoint with programming mistakes? And then you still wouldn't
get the sense that typos were on an opposite side of a continuum from
programming mistakes (the way I see it). Ah, a tree:
bad stuff in programs
|
|-----------------|
programming mistake bug
|
|------------------|
brain fart typo
Though left-right subbranch orientation isn't usually meant to convey
"distance" from other branches.
>
> >Then very few of the Y2K "bugs" actually qualify: they're either
> >programming mistakes, or there by (shortsighted) design.
>
> That was Tom's original point. Welcome to the thread.
>
Thank you. Sorry for the redundancy. I *had* read Tom's message, but
didn't realize he was making a distinction; thought he was simply
preferring the term "programming mistake" in general to "bug". But now
I see you're probably right.
------------------------------
Date: Tue, 27 Jul 1999 11:20:54 -0300
From: Julio Carrio <jcarrio@imagelink.com.br>
Subject: Re: Getting page title
Message-Id: <379DC046.A672627B@imagelink.com.br>
e-bin wrote:
> Try picking up a book and learning it, or read one of the many many
> resources available on the internet.
Thanks, I'm going to search in the web. Books generally don't be so good ...
Julio
------------------------------
Date: Tue, 27 Jul 1999 11:26:01 -0300
From: Julio Carrio <jcarrio@imagelink.com.br>
Subject: Re: Getting page title
Message-Id: <379DC179.7804A3E6@imagelink.com.br>
Abigail wrote:
> Start reading on how to do sockets. (But why not just download the entire
> page?)
>
> Abigail
Thanks, I'm going to take a look ...
Nor everybody possesses a good internet connection, at least for here. I prefer to
continue with the old and already forgotten philosophy of the economy.
Julio
------------------------------
Date: 27 Jul 1999 13:19:24 GMT
From: steve.vanderburg@lhsc.on.ca (Steve van der Burg)
Subject: Re: HTML::Parser sample
Message-Id: <8E105FDD0stevevanderburglhsco@newshost.uwo.ca>
>> Kin Lum wrote:
>> >
>> > to use HTML::Parser, shouldn't the following code work?
>> > it seems that the method cannot be overridden...
>> >
>> > #!/usr/local/bin/perl
>> >
>> > require HTML::Parser;
>> > $p = HTML::Parser->new;
>> >
>> > $p->parse("<b>hi</b><i><bbb>");
>> > $p->eof;
>> >
>> > sub start {
>> > print join(" ", @_), "\n";
>> > }
Comments about HTML::Parser notwithstanding, an example of subclassing
it can be found here:
http://x31.deja.com/getdoc.xp?AN=504124026&CONTEXT=933081149.1000865886
&hitnum=0
To see another, possibly easier-to-comprehend-at-first-glance example,
look at the source to HTML::Filter, also from Gisle Aas'.
...Steve
--
Steve van der Burg
Technical Analyst, Information Services
London Health Sciences Centre
London, Ontario, Canada
Email: steve.vanderburg@lhsc.on.ca
------------------------------
Date: 27 Jul 1999 14:27:13 GMT
From: damercer@mmm.com (Dan Mercer)
Subject: Re: Korn Shell or Perl?
Message-Id: <7nkfk1$ek6$5@magnum.mmm.com>
In article <x7wvvmu9n7.fsf@home.sysarch.com>,
Uri Guttman <uri@sysarch.com> writes:
>>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
>
> why did you repost this dreck?
>
> wang keeps trying to do wierd things with do blocks in for loops. he has
> recently posted several crazy pieces of perl code with do blocks to both
> misc and moderated and has me wondering if he is for real. by trying to
> do all the work inside the for () he is making the code totally opaque
> and impenetrable.
>
> TC> I would like to use the following code to illustrate Perl awkwardness
> TC> and inefficiency. It is quite easy and straightforward with shell's
> TC> pipelines, which Perl does not have. What Perl has is limited Korn
> TC> shell equivalent $(...).
>
> this is more a demonstration of the inefficiency of your programming
> skills. this can't be done easily in shell but it is trivial in perl if
> you think correctly. as this is not spec'ed fully my code may not work
> but it will give you an idea of how to do it. and STOP with the do{}
> blocks. very rarely are they needed and you seem to think they are the
> only way to do things in perl.
>
[[ DELETED ]]
>
>
> if ( $opt_d ne 'all' ) {
>
> @yp_data = split(/,\s*/, $opt_d);
> }
> else {
>
> foreach $source ( split( /,/, $opt_b) ) {
>
> push( @yp_data, keys %::beeper_byname ) && next
> if $source eq 'local'
>
> if ( $source eq 'yp' ) {
>
> @beepers = `ypcat -k beeper.byname` ;
> push( @yp_data, map( /(\w+)/, @beepers ) ) ;
> }
> }
> }
>
> foreach $yp ( @yp_data ) {
>
> next if $yp =~ /^YP_/ ;
>
> ($k, @devnull)=get_pin("0", "1", "0", $opt_b, $j);
> $exit_status+=$k;
> }
>
>
> now isn't that simpler and clearer than the crap you wrote below. and NO
> do blocks are needed. STOP THAT HABIT NOW!!!!
>
> uri
>
>
I think the above helps to make one thing clear in this discussion
and that is a shell script will be fairly clear to anyone familiar
with a command line interface and the Unix utilities. A Perl script
will be clear only to someone who knows Perl. So deciding on which
to use, Perl or shell, will determine who has to support it in the
future.
--
Dan Mercer
damercer@uswest.net
------------------------------
Date: 27 Jul 1999 09:15:53 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Newbie needs help: Environment variables
Message-Id: <slrn7prfnt.1mc.abigail@alexandra.delanet.com>
Masse (massea@yahoooo.com) wrote on MMCLVI September MCMXCIII in
<URL:news:379D8E04.FC80541B@yahoooo.com>:
[] Doesn't
[]
[] $ENV{variable_name} = $value;
[]
[] work?
Sure it works.
However, it might not do what you expect it to do. But since your
question just is "doesn't it work", what else can I say?
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Tue, 27 Jul 1999 14:40:47 GMT
From: spicastretford@my-deja.com
Subject: Re: newbie question: system ()/error message
Message-Id: <7nkgdd$7s7$1@nnrp1.deja.com>
In article <379D00BC.8ADAE4FC@rochester.rr.com>,
Bob Walton <bwalton@rochester.rr.com> wrote:
> Look up the return value of the system command in perlfunc. It is the
> error code returned by the program. Most successful programs return
an
> error code of zero. If you get a zero error code, you execute the
die.
> You probably want to die on a non-zero error code, so try && instead
of
> ||. If your system() call was successful, the contents of $! are not
> expected to be "anything in particular" (from perlvar), so your error
> message is meaningless.
Thanks for the information. I wasn't sure how I was supposed to use the
error code. Since I changed the || to &&, I'm able to get past that line
now.
Spica
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 27 Jul 1999 08:55:48 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Orwant book status? (was Re: stopping email)
Message-Id: <slrn7prei8.1mc.abigail@alexandra.delanet.com>
John Callender (jbc@shell2.la.best.com) wrote on MMCLVI September
MCMXCIII in <URL:news:379d5af2$0$202@nntp1.ba.best.com>:
||
|| Speaking of algorithm books, does anyone know the status of Jon
|| Orwant's new O'Reilly book? It was supposed to be coming out some time
|| ago, and I've really been pining for it.
It's supposed to be ready before the conference.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 27 Jul 1999 13:54:14 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Orwant book status? (was Re: stopping email)
Message-Id: <slrn7prekb.b5m.fl_aggie@thepentagon.com>
On 27 Jul 1999 07:08:34 GMT, John Callender <jbc@shell2.la.best.com>, in
<379d5af2$0$202@nntp1.ba.best.com> wrote:
+ Speaking of algorithm books, does anyone know the status of Jon
+ Orwant's new O'Reilly book? It was supposed to be coming out some time
+ ago, and I've really been pining for it.
Well, according to www.ora.com's search engine (my G*d, a search engine
that returned useful results!):
Mastering Algorithms with Perl
By Jon Orwant, Jarkko Hietaniemi & John Macdonald
1st Edition August 1999 (est.)
1-56592-398-7, Order Number: 3987
688 pages (est.), $34.95 (est.)
Note that all the important details are all (est.). Looks like Real Soon
Now.
James
------------------------------
Date: Wed, 28 Jul 1999 00:56:56 +1000
From: "Brendan Reville" <breville@mpce.mq.edu.au>
Subject: Re: paragraph breaks in text?
Message-Id: <7nkhco$9a0$1@sunb.ocs.mq.edu.au>
> Where is the Perl in your question? Anyhow, what about
>
> <PRE>Some multiline
> text</PRE>
>
> So you get the line breaks the sender used. If the sender typed no
> breaks at all, you may add them, otherwise you have to scroll the mail
> horizontally.
could work, but I really want to work out where the writer's paragraphs
were, so that I don't have to use a fixed-width font, and so that I can
re-render the message for any width of browser window.
I thought there might be some clever Perl trickery to pull the multiline
text back into a format which essentially has one paragraph per line
(somehow working out where the paragraph breaks are), but perhaps it hasn't
been done yet...
------------------------------
Date: Tue, 27 Jul 1999 08:39:09 -0500
From: Ray Cadmus <rcadmus@amctheatres.com>
Subject: Re: perl to interpret a XLS file?
Message-Id: <379DB67C.EA15C87C@amctheatres.com>
I see that another of the responses points out GD.pm. That will allow you
to draw what you need. Now, what to draw. Check out
http://www.wotsit.org/ for file formats, including XLS. From that you
should be able to extract whatever you need.
Good luck,
ray
skao@my-deja.com wrote:
> The following task has been posed to me:
>
> They want the ability to extract certain graphs from an Excel Spreadheet
> and saved to gif files. Catch though, this must be performed on the web
> server, instead of by the user on her native system (probably Windows
> 95). This would seem to be an extremely hairy task, if it could be
> done. I would have to interpret the excel spreadsheet, first of all.
> After that is done, I would have to determine which objects to extract,
> and then somehow convert it to an acceptable file format
> (gif/jpg/etc...). Does anyone have any opinions/suggestions on how this
> could be accomplished?
>
> Are there currently any Perl scripts that would point me in the right
> direction? Or even something written in Java/C++/or existing unix
> utilities?
>
> Thanks.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: 27 Jul 1999 14:41:02 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: question on times function
Message-Id: <7nkgdu$9a7$1@lublin.zrz.tu-berlin.de>
Andreas Tanner <tanner@ultra.math.uni-potsdam.de> wrote in comp.lang.perl.misc:
>Sorry for this naive question, but I don't understand the definition of
>the times function in the manual. It says "..returns user and system
>times for this process, and the children of this process..
>Now what does "this process" mean?
>Can I measure running times of some script like this:
>
>"frame.pl":
>print PROT times;
>system("perl myscript");
>print PROT times;
>
>where myscript contains a lot of system calls (to be precise, calls of
>Latex of some automatically generated files).
Yes. The system() call creates a child process. Its time consumption
will be collected in ( times )[ 2, 3].
Anno
------------------------------
Date: Tue, 27 Jul 1999 14:52:45 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: reg expression
Message-Id: <Pine.HPP.3.95a.990727145050.2361E-100000@hpplus03.cern.ch>
On Tue, 27 Jul 1999, llornkcor wrote:
> I still don't see why, if those people that lurk here for years, are tired of
> seeing these questions posted, can't just IGNORE them???
I don't suppose there's any point in trying to explain it to you.
------------------------------
Date: Tue, 27 Jul 1999 14:39:18 GMT
From: llornkcor@my-deja.com
Subject: Re: reg expression
Message-Id: <7nkgal$7q3$1@nnrp1.deja.com>
Thank you for your kind reply, it is appreciated
LP
In article <379baa40$0$217@nntp1.ba.best.com>,
John Callender <jbc@shell2.la.best.com> wrote:
> llornkcor <llornkcor@llornkcor.com> wrote:
> > Is there any wild card expressions ? I would like to delete all <img
> > src="blah blah blah"> tags. Not knowing what the actual url of the
> > image is. How could I match all the characters from < to >?
>
> Well, those are actually three different questions.
>
> Yes, there are wildcards in regular expression syntax. The period (.)
> is a wildcard character matching "any one character (except a newline,
> and including a newline if the /s modifier is in effect)". Sticking a
> quantifier after the period (like an asterisk - * ) makes it match as
> many times in a row as possible, such that .* means "match as many of
anything
> as possible", more or less, which is sort of a wildcard-ish sort of
> thing.
>
> Deleting all <IMG ...> tags via a regular expression has various
> solutions ranging from fairly naive (but easy to write) to more
> reliable (but harder to write). At the naive/easy end of the spectrum
> would be something like:
>
> $string =~ s/<\s*img\s[^>]+>//gi;
>
> which you could read as saying: "within $string, delete all
occurrences
> of substrings that begin with '<', then have zero or more whitespace
> characters, then 'img', then have a whitespace character, then have
one
> or more characters that are anything but '>', then have a '>'."
>
> The reason this is naive is that it will fail in various situations,
> such as an IMG tag that looks like this:
>
> <IMG SRC="something.gif" ALT=">>>Click Here<<<">
>
> The Perl Cookbook addresses these issues in recipe 20.6, where it
> recommends using LWP's HTML::Parse module (among others) to build
> non-naive solutions.
>
> Your third question (how to match - and, I assume, delete - all
> characters from < to >) would seem to be answered with something like:
>
> $string =~ s/<[^>]*>//g;
>
> though that has the problems mentioned above, and deletes all tags,
not
> just IMG tags.
>
> --
> John Callender
> jbc@west.net
> http://www.west.net/~jbc/
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 27 Jul 1999 07:55:43 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: reg expression
Message-Id: <379DC86F.47119166@mcmahon.qal.berkeley.edu>
r j huntington wrote:
> ...
> But there she degrades into gratuitous insults.
>
> One wonders why she does this. Can she show cause? Or is she just mean?
>
Presumably it's because she's so tired of repeating boring answers to
stupid questions that are already answered in the docs. Personally, I find
Abigail's work here both entertaining and informative -- even the times
it's been aimed at me :).
ap
--
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting -
aperrin@mcmahon.qal.berkeley.edu
http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------
------------------------------
Date: 27 Jul 1999 13:45:35 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: stopping email overflow on failure
Message-Id: <slrn7pre44.b5m.fl_aggie@thepentagon.com>
On Tue, 27 Jul 1999 01:24:46 GMT, Andrew Johnson <andrew-johnson@home.com>, in
<yT7n3.49$K%6.2928@news1.rdc2.on.home.com> wrote:
+ In article <slrn7pptbo.80l.fl_aggie@thepentagon.com>,
+ I R A Darth Aggie <fl_aggie@thepentagon.com> wrote:
+ ! On Mon, 26 Jul 1999 22:09:06 GMT, Matthew Bafford <*@dragons.duesouth.net>, in
+ ! <slrn7ppm4a.1q4.*@dragons.duesouth.net> wrote:
+ !
+ ! + Is the fish dead (which makes it difficult to find)?
+ !
+ ! In that case, use the Fish::Surface module.
+
+ perhaps the Schrodinger::Fish module would be more
+ instructive as it seems the original poster is intent
+ on not opening the box.
Good point, but wouldn't that conflict with the Schrodinger::Cat
module?
James
------------------------------
Date: Tue, 27 Jul 1999 13:59:07 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: stopping email overflow on failure
Message-Id: <379dba80.16188918@news.uniplus.ch>
On 27 Jul 1999 13:45:35 GMT, fl_aggie@thepentagon.com (I R A Darth
Aggie) wrote:
>+
>+ perhaps the Schrodinger::Fish module would be more
>+ instructive as it seems the original poster is intent
>+ on not opening the box.
>
>Good point, but wouldn't that conflict with the Schrodinger::Cat
>module?
>
No problem putting both in the same module, they won't see each other.
Kind of private objects, not only private data.
Andreas
------------------------------
Date: 27 Jul 1999 07:19:46 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Which group is appropriate?
Message-Id: <379db1f2@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
bj <bradw@newbridge.com> writes:
:Whom would babysit said group, answering the same FAQs over and over
^
:again, correcting all the wrong answers, gently redirecting all the
:lost, confused and clueless back to the road towards better
:understanding?
While your point is well-taken, I'm afraid your accusatives are leaking
through. Here's a pop quiz:
1 It's really a question of who/whom you're trying to make happy.
2 It's really a question of who/whom is happy.
3 It's really a question of who/whom you've seen.
4 It's really a question of who/whom wants to go.
5 It's really a question of who/whom is going.
6 It's really a question of who/whom you think is going.
7 It's really a question of who/whom you told to go.
When you've figured out the correct answers to those seven simple
questions, the rest will be easy.
--tom
--
Although the Perl Slogan is There's More Than One Way to Do It, I hesitate
to make 10 ways to do something. :-)
--Larry Wall in <9695@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Tue, 27 Jul 1999 09:51:48 -0400
From: toby <toby@venice.cas.utk.edu>
Subject: Re: Which group is appropriate?
Message-Id: <379DB974.A62D9798@venice.cas.utk.edu>
> [Fundamental ignorance of Socratic philosophy snipped]
> + Please, how does ridicule help anyone?
>
> Most people have pride. When that pride is wounded, they're more likely
> to _not_ repeat their mistake(s).
This rules out masochism and other socio-psychological constructs that one can
see in the everyday co-worker, and sometimes oneself..
> + If so, when exactly does a programmer need to be tough?
>
> When reaching for the <post> button...
>
Point taken.
>
> Because programming requires discipline?
>
To me, discipline requires a narrowing tack, rather than openness. Is it not
true that the concept of discipline is founded in the notion that there is
only one way to do things, a priori? You could say that a rock climber is
disciplined in that he/she works out, concentrates on a goal, etc. But the
rock climber never goes up the rock the same way. It may be a case of
lazynesss (following a well-established line), artistry (a creative twist on
the established line) or brilliance (trail-blazing, eurekas-at-every-move on a
new line). Certainly the last instance would be preferable, but are we all
capable of each? This question is not rhetorical.
Toby
------------------------------
Date: Tue, 27 Jul 1999 07:29:32 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Win32::EventLog
Message-Id: <MPG.1207621ef47f0c67989d4e@nntp.hpl.hp.com>
In article <7njmoo$8ha$1@lublin.zrz.tu-berlin.de> on 27 Jul 1999
07:23:04 -0000, Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> says...
...
> - You posted uuencoded material without saying what it is. So you
> probably made hundreds of people go through the hassle to decode
> it, only to find that it's of no interest.
I wonder if anybody did. I know it didn't occur to *me*. That's what
the Next key is for.
> Please be more considerate in future.
... if you want anybody to pay attention.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
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". 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 V9 Issue 270
*************************************