[16793] in Perl-Users-Digest
Perl-Users Digest, Issue: 4205 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 2 00:05:39 2000
Date: Fri, 1 Sep 2000 21:05:19 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <967867518-v9-i4205@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 1 Sep 2000 Volume: 9 Number: 4205
Today's topics:
Re: $LIST_SEPARATOR bug?? <tina@streetmail.com>
Re: a wannabe (Jon Bell)
Re: Adding HTML to every page in a directory <rmore1@my-deja.com>
Re: APPLICATION NEEDED for E-COMMERCE (Gwyn Judd)
Re: APPLICATION NEEDED for E-COMMERCE <xtremex@telusplanet.net>
Re: Bug in Perl regular expressions? <stevea@wrq.com>
Re: Chicago Perl Talks by Damian Conway, October (Damian Conway)
Re: Chicago Perl Talks by Damian Conway, October <wyzelli@yahoo.com>
Re: Chicago Perl Talks by Damian Conway, October <uri@sysarch.com>
Re: Connect to HP3000 using PERL ??? (Paul Thompson)
Re: Help! my comma's are comma%27s <perspiring@nuts.com>
Re: Help! my comma's are comma%27s <tina@streetmail.com>
Re: how to use HTTP::Cookies <rmore1@my-deja.com>
Re: Interesting perl behavior (Gwyn Judd)
Re: Interesting perl behavior (David Wall)
Re: Interesting perl behavior (Eric Bohlman)
list assignment to pre-existing hash <lds@i-55.com>
Re: list assignment to pre-existing hash (Clinton Pierce)
Re: My Perl looks like C! <remove.this@talexb@tabsoft.on.ca>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 2 Sep 2000 03:07:54 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: $LIST_SEPARATOR bug??
Message-Id: <8opqua$bhbvf$3@ID-24002.news.cis.dfn.de>
hi,
Sean Meisner <sdmeisner@spamguardyahoo.com> wrote:
> ActiveState docs for version 5.6.0.616 as installed on my Windows machine
> say:
> $LIST_SEPARATOR
> $``
> "man perlvar" on the Linux box with version 5.005_03 at work says:
> $LIST_SEPARATOR
> $"""" This is like "$," except that it applies to array
it's $"
i never noticed that before, it must be something with
the man/perldoc. I get the same output on linux.
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \__,_\___/\___/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: Sat, 2 Sep 2000 02:57:04 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: a wannabe
Message-Id: <G08o74.3It@presby.edu>
In article <zUWr5.6270$il3.115105@news6-win.server.ntlworld.com>,
Neil Jones <neil.jones2@virgin.net> wrote:
>give me a clue where do i start
>i know zero
Well, the obvious first step is to start with "one".
--
Jon Bell <jtbell@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
[ Questions about newsgroups? Visit http://www.geocities.com/nnqweb/ ]
[ or ask in news:news.newusers.questions ]
------------------------------
Date: Sat, 02 Sep 2000 03:50:33 GMT
From: Rich More <rmore1@my-deja.com>
Subject: Re: Adding HTML to every page in a directory
Message-Id: <8opte3$bg8$1@nnrp1.deja.com>
In article <K6Tr5.19$18.3407@news-west.eli.net>,
"Michael Turitzin" <stevet@thevision.net> wrote:
> Is there a way to add a HTML header to every page in a certain
directory?
> Like free hosting sites add a banner to the top of every page.
>
>
Try: Template.pm
http://www.nilo.com/bdnsw/HTMLTemplateIntro.html
or use Server Side Includes (SSI ) and .shtml files.
http://www.apache.org/docs/mod/mod_include.html
--
=============================
Richard More
http://www.richmore.com/
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 02 Sep 2000 01:07:13 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: APPLICATION NEEDED for E-COMMERCE
Message-Id: <slrn8r0klv.ioe.tjla@thislove.dyndns.org>
I was shocked! How could Irene Facchin <xtremex@telusplanet.net>
say such a terrible thing:
>I am looking for a perl application for E-Commerce,
>I am not concerned if it is completed. But I would like something that I
>can complete
>
>I am very familiar with Perl, and would like to see if there is somethign
>that can expediate the work I need to do\
Yes there is. It's called a "Programmer".
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
To many, total abstinence is easier than perfect moderation.
-- St. Augustine
------------------------------
Date: Sat, 02 Sep 2000 01:21:24 GMT
From: "Irene Facchin" <xtremex@telusplanet.net>
Subject: Re: APPLICATION NEEDED for E-COMMERCE
Message-Id: <oCYr5.288$7F3.207880@news0.telusplanet.net>
thank you for your comment'
I was hoping to make the project faster working with someone who started one
or is not interested in continuing it...
"Gwyn Judd" <tjla@guvfybir.qlaqaf.bet> wrote in message
news:slrn8r0klv.ioe.tjla@thislove.dyndns.org...
> I was shocked! How could Irene Facchin <xtremex@telusplanet.net>
> say such a terrible thing:
> >I am looking for a perl application for E-Commerce,
> >I am not concerned if it is completed. But I would like something that I
> >can complete
> >
> >I am very familiar with Perl, and would like to see if there is somethign
> >that can expediate the work I need to do\
>
> Yes there is. It's called a "Programmer".
>
> --
> Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
> To many, total abstinence is easier than perfect moderation.
> -- St. Augustine
------------------------------
Date: 01 Sep 2000 12:31:54 -0700
From: Steve Allan <stevea@wrq.com>
Subject: Re: Bug in Perl regular expressions?
Message-Id: <u7l8vgb85.fsf@wrq.com>
jba_lixx@my-deja.com writes:
<snip>
>
>($scoretext=~ /^(\d+):(\d+)/) && ($score1= $1) && ($score2 = $2)
>
>This works fine as long as we have scores like "2:3", "1:0" , "1:1" etc.
>
>The only time we have a problem is when we have a score with a leading
>zero like "0:4"
>
>In this case, $score1 is "0", which is correct, but $score2 is still
>empty.
>
If $1 is 0, then the expression ($score1 = $1) evaluates to 0, which
is false, so the second && is short-circuited. I think a better way
to write the above would be
$_ = '0:4';
($score1, $score2) = /(\d+):(\d+)/;
but split is probably the best method since you've already verified
the input contians digits.
--
-- Steve __
------------------------------
Date: 2 Sep 2000 01:43:54 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: Chicago Perl Talks by Damian Conway, October
Message-Id: <8opm0q$ar5$1@towncrier.cc.monash.edu.au>
Keywords: damian conway oop chicago chicago.pm parsing perl mongers quantum
Tim Maher <spug@halcyon.com> writes:
> * * * Free Chicago talk by Damian Conway * * *
>> You will get to see Damian Conway explain how to adapt quantum
>> computing to Perl, and vice versa. Along the way, he'll touch
>> on confectionary physics, parallel programming, motor racing,
>> ancient Latin, winter sports, advanced OO, modern German, cruelty
>> to animals, and the *original* Copenhagen.pm.
I've enhanced the talk slightly since July, so I'll also be covering
important topics such as the Scottish vegan movement, the glycemic index
of potatoes, and Mick Jagger's sex life.
Damian
------------------------------
Date: Sat, 2 Sep 2000 11:47:48 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Chicago Perl Talks by Damian Conway, October
Message-Id: <KxZr5.8$_j.2561@vic.nntp.telstra.net>
"Damian Conway" <damian@cs.monash.edu.au> wrote in message
news:8opm0q$ar5$1@towncrier.cc.monash.edu.au...
> Tim Maher <spug@halcyon.com> writes:
> >> You will get to see Damian Conway explain how to adapt quantum
> >> computing to Perl, and vice versa. Along the way, he'll touch
> >> on confectionary physics, parallel programming, motor racing,
> >> ancient Latin, winter sports, advanced OO, modern German, cruelty
> >> to animals, and the *original* Copenhagen.pm.
>
> I've enhanced the talk slightly since July, so I'll also be covering
> important topics such as the Scottish vegan movement, the glycemic
index
> of potatoes, and Mick Jagger's sex life.
I trust Tasmanian potatoes score well in their glycemic index!
Wyzelli
------------------------------
Date: Sat, 02 Sep 2000 03:55:18 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Chicago Perl Talks by Damian Conway, October
Message-Id: <x7ya1bo3bt.fsf@home.sysarch.com>
>>>>> "DC" == Damian Conway <damian@cs.monash.edu.au> writes:
DC> Tim Maher <spug@halcyon.com> writes:
>> * * * Free Chicago talk by Damian Conway * * *
>>> You will get to see Damian Conway explain how to adapt quantum
>>> computing to Perl, and vice versa. Along the way, he'll touch
>>> on confectionary physics, parallel programming, motor racing,
>>> ancient Latin, winter sports, advanced OO, modern German, cruelty
>>> to animals, and the *original* Copenhagen.pm.
DC> I've enhanced the talk slightly since July, so I'll also be covering
DC> important topics such as the Scottish vegan movement, the glycemic index
DC> of potatoes, and Mick Jagger's sex life.
damn you, evil spawn from down under! now i will have to go to chicago to
be updated. and you are skipping boston on this tour again.
and are you keeping your talk the same length each time? or rather
lecturing with a constant time limit?
:-)
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 02 Sep 2000 01:04:51 GMT
From: thompson @ athenet.net (Paul Thompson)
Subject: Re: Connect to HP3000 using PERL ???
Message-Id: <39b05233$0$23903$39368dfe@news.twtelecom.net>
If the HP3000 is on MPE 6.0 or higher you should be able to activate
(or have the system manager activate) STRTNET.PUB.SYS which activates
the INETD.NET.SYS process which will provide a telnet compatible interface
into the system. Things like 'more' in the POSIX shell or GLANCE/IX won't
work right due to the emulation but most other command lines that don't
perform terminal tricks should be OK.
paul
In article <39ADA19A.820062CB@hp.com>,
Raymond W Yu <raymond_w_yu@hp.com> writes:
> Hi all,
>
> I am trying to connect to a HP3000 MPE/ix system using PERL to automate
> some tasks.
>
> Is there a module that I can use to connect to the HP3000?
>
> I tried Net::Telnet and it doesn't work. Then I tried telnet
> hp3000-host 1537,
> I got garbage.
>
> I was able to use Reflection via OLE to connect to the HP3000, but the
> performance is
> very slow.
>
> Any help or pointers will be appreciated.
>
>
> Ray
> 650-236-5998
--
------------------------------
Date: Fri, 1 Sep 2000 23:17:23 -0400
From: "perspiring goth" <perspiring@nuts.com>
Subject: Re: Help! my comma's are comma%27s
Message-Id: <39b0702e_2@news.newsfeeds.com>
Thanks! But where does it go? (I'm very new at this!) I get this as a
return:
CGI::unescape(comma%27s)
"Christian Mahnke" <mahnke@uni-freiburg.de> wrote in message
news:8opidg$9di$1@news.online.de...
> You have to decode it. Commas, semicolons and the like are encoded by the
> Browser.
> Do it with "CGI::unescape($yourvar)".
> If you don't need CGI for the rest of your program, just look up the
> subroutine "unescape ()" in CGI.pm and use this.
>
> Cheers,
>
> Christian
>
>
> perspiring goth <perspiring@nuts.com> schrieb in im Newsbeitrag:
> 39b03f0f_2@news.newsfeeds.com...
> > Form input won't print commas, semi-colons, etc... just %27s and the
like.
> > See for yourself at www.asd-1817.org/test.html.
> >
> > Any help would be truly appreciated. I'm just trying to do forms for a
> > school intranet site.
> >
> > Thanks
> >
> >
> >
> >
> > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> > -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
>
>
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
------------------------------
Date: 2 Sep 2000 03:28:16 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: Help! my comma's are comma%27s
Message-Id: <8ops4g$bhbvf$4@ID-24002.news.cis.dfn.de>
hi,
perspiring goth <perspiring@nuts.com> wrote:
> Thanks! But where does it go? (I'm very new at this!) I get this as a
> return:
> CGI::unescape(comma%27s)
> "Christian Mahnke" <mahnke@uni-freiburg.de> wrote in message
> news:8opidg$9di$1@news.online.de...
>> You have to decode it. Commas, semicolons and the like are encoded by the
>> Browser.
>> Do it with "CGI::unescape($yourvar)".
$unescaped = CGI::unescape($yourvar);
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \__,_\___/\___/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: Sat, 02 Sep 2000 03:41:25 GMT
From: Rich More <rmore1@my-deja.com>
Subject: Re: how to use HTTP::Cookies
Message-Id: <8opst2$asr$1@nnrp1.deja.com>
In article <MPG.141a75dd568cd7da989683@news.cyberway.com.sg>,
DT <dsa@dassda.com> wrote:
> How to use HTTP::Cookies and HTTP::Requestto read cookie from an URL
> request and set cookie to an URL? thanks!
>
From: perldoc LWP::UserAgent
$ua->cookie_jar([$cookies])
Get/set the HTTP::Cookies object to use. The default
is to have no cookie_jar, i.e. never automatically add
"Cookie" headers to the requests.
And from: perldoc HTTP::Cookies
$cookie_jar->add_cookie_header($request);
The add_cookie_header() method will set the
appropriate Cookie:-header for the HTTP::Request
object given as argument. The $request must have a
valid url attribute before this method is called.
$cookie_jar->extract_cookies($response);
The extract_cookies() method will look for Set-Cookie:
and Set-Cookie2: headers in the HTTP::Response object
passed as argument. Any of these headers that are
found are used to update the state of the $cookie_jar.
--
=============================
Richard More
http://www.richmore.com/
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 02 Sep 2000 01:11:24 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Interesting perl behavior
Message-Id: <slrn8r0ktq.ioe.tjla@thislove.dyndns.org>
I was shocked! How could Ramacharan Sundararaman <charan@ptdcs2.intel.com>
say such a terrible thing:
>Hi,
> I tried this short perl program on AIX & Linux and found this
>interesting erroneous behaviour. It looks like perl has rounding errors
>for numbers with a mantissa(close to) powers of 2. Can anyone
>knowledgeable on this please enlighten me about this behavior? Is it a
>bug in perl's internal FP format?
Yes and no. The trouble with floating point numbers is that there are
some numbers that cannot be accurately represented. If you ran the same
program written in C you would get the same result.
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Remembering is for those who have forgotten.
-- Chinese proverb
------------------------------
Date: 1 Sep 2000 21:20:27 -0400
From: darkon@one.net (David Wall)
Subject: Re: Interesting perl behavior
Message-Id: <8FA2D2E5Cdarkononenet@206.112.192.118>
charan@ptdcs2.intel.com (Ramacharan Sundararaman) wrote in
<39B04C0E.91421526@ptdcs2.intel.com>:
>Hi,
> I tried this short perl program on AIX & Linux and found this
>interesting erroneous behaviour. It looks like perl has rounding errors
>for numbers with a mantissa(close to) powers of 2. Can anyone
>knowledgeable on this please enlighten me about this behavior? Is it a
>bug in perl's internal FP format?
>
>
>
>perl
>for ($i=0; $i<20; $i++) {
>$x = 2**$i + .2;
>$y = 2**$i + .1;
>print "x=$x, y=$y, diff=", $x-$y, "\n";
>}
The (finite) numbers capable of representation on a computer do not
correspond exactly to the infinite uncountable real numbers....
--
David Wall
darkon@one.net
------------------------------
Date: 2 Sep 2000 01:20:10 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Interesting perl behavior
Message-Id: <8opkka$3d5$3@slb7.atl.mindspring.net>
Ramacharan Sundararaman (charan@ptdcs2.intel.com) wrote:
: Hi,
: I tried this short perl program on AIX & Linux and found this
: interesting erroneous behaviour. It looks like perl has rounding errors
: for numbers with a mantissa(close to) powers of 2. Can anyone
: knowledgeable on this please enlighten me about this behavior? Is it a
: bug in perl's internal FP format?
:
: perl
: for ($i=0; $i<20; $i++) {
: $x = 2**$i + .2;
: $y = 2**$i + .1;
: print "x=$x, y=$y, diff=", $x-$y, "\n";
: }
Your program is subtracting large floating-point numbers that differ only
slightly. Regardless of the language you use, that's going to cause
*severe* loss of precision; it's an inherent problem with floating-point
arithmetic. The first thing you learn in a numerical analysis course is
not to do this in your calculations; see any numerical analysis textbook
for more details.
For example, neither the standard high-school quadratic formula nor the
textbook one-pass formula for the standard deviation are numerically
stable, precisely because under some circumstances they involve
subtracting two almost-equal quantities. There are alternative formulas
that are more complicated because they're specifically arranged to avoid
this sort of subtraction.
------------------------------
Date: Fri, 1 Sep 2000 20:47:36 -0700
From: "lds" <lds@i-55.com>
Subject: list assignment to pre-existing hash
Message-Id: <36Zr5.8723$Jq2.17024@dfw-read.news.verio.net>
I was reading the camel book at lunch today...but more to the point...
I understand that when a list is assigned to a hash alternating values of
the list become the key value pairs of the hash:
%some_hash = @the_list ;
if "@the_list" contains the values "alphabet" and "abcd"
(in that order) then "alphabet" becomes a key in the
"%some_hash"
and "abcd" becomes the value of that key...
Now my question is this, does assigning a list to a pre-existing hash
delete,
destroy, or otherwise corrupt the key/value pairs already stored in the
hash?
I am assuming that none of the list values would create key names that
already exist. If the list values would create a key name already present in
the hash
what would happen then?
~ just another perl newbie
------------------------------
Date: Sat, 02 Sep 2000 03:17:42 GMT
From: clintp@geeksalad.org (Clinton Pierce)
Subject: Re: list assignment to pre-existing hash
Message-Id: <qj_r5.23759$QW4.298366@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <36Zr5.8723$Jq2.17024@dfw-read.news.verio.net>,
"lds" <lds@i-55.com> writes:
> I was reading the camel book at lunch today...but more to the point...
>
> Now my question is this, does assigning a list to a pre-existing hash
> delete,
> destroy, or otherwise corrupt the key/value pairs already stored in the
> hash?
Always I ask my students:
"Well? Did you try it? What did it do?"
Perl is an empirical science.
> I am assuming that none of the list values would create key names that
> already exist. If the list values would create a key name already present in
> the hash
> what would happen then?
%foo=@listofstuff;
Is just an initilization. Anything (anything at all!) in the hash
is destroyed and set to @listofstuff regardless of what winds up as
keys and what winds up as data. For example:
@listofstuff=();
%foo=@listofstuff;
Clears the hash of all keys and values.
Extrapolate from there. :)
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Sat, 02 Sep 2000 01:25:56 GMT
From: T. Alex Beamish <remove.this@talexb@tabsoft.on.ca>
Subject: Re: My Perl looks like C!
Message-Id: <jol0rs878bmeusoa4c1ik76v1kupjg0ut6@4ax.com>
On Fri, 1 Sep 2000 12:13:43 -0400, "David Stanek" <usenet@dstanek.com>
wrote:
>Try this one: http://www.perl.com/pub/doc/manual/html/pod/perlstyle.html
Nice page, except that the information is repeated.
But it's kinda neat to see my style preferences mostly match Larry
Wall's.
T. Alex Beamish -- TAB Software
http://www.tabsoft.on.ca
talexb at tabsoft dot on dot ca
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 4205
**************************************