[10394] in Perl-Users-Digest
Perl-Users Digest, Issue: 3987 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 15 20:01:42 1998
Date: Thu, 15 Oct 98 17:00:19 -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 Thu, 15 Oct 1998 Volume: 8 Number: 3987
Today's topics:
Re: "strict subs" choking on method perl file handles (William R. Ward)
Anyone for a Tyne+Wear.pm ?? (Chris Benson)
Re: Are there no PERL experts out there?? Is there no o <rick.delaney@shaw.wave.ca>
Camel Pub (was Re: Raleigh.pm has registered) <uri@camel.fastserv.com>
Re: Combining two @array's (Abigail)
Compiling Perl compiler on AIX lrosicky@my-dejanews.com
Re: encryption (David Formosa)
Re: help! trying to emulate server side includes... (minus the SPAMSUCKS) (Chris Stanley)
Re: help! trying to emulate server side includes... (William Byrd)
Re: Implementing an ordered queue (Mark-Jason Dominus)
Re: New to programming - New to Perl - LOST!!!! <mark@uninetwork.com>
Re: Odd error message with ActivePerl on Windows NT (Ethan H. Poole)
passing stdout/stderr from perl to java (EXCHANGE:SKY:1P66)
Re: passing stdout/stderr from perl to java <rootbeer@teleport.com>
Re: Perl & window.open <paulus@planetkc.com>
Re: Perl FAQ - error found in "#How_do_I_get_a_file_s_t (Martien Verbruggen)
perl script to keep dynamic server active and on-line (William Byrd)
Re: perl script to keep dynamic server active and on-li <rootbeer@teleport.com>
Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has regi <eashton@bbnplanet.com>
Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has regi (Adam Turoff)
Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has regi <eashton@bbnplanet.com>
Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has regi <murrayb@vansel.alcatel.com>
redirecting stderr to stdout (EXCHANGE:SKY:1P66)
Re: redirecting stderr to stdout <rootbeer@teleport.com>
Re: Sorry (Michael J Gebis)
Re: Sorry (I R A Aggie)
Re: Sorry (Larry Wall)
Re: The space deletion woes... (Larry Rosler)
Re: The space deletion woes... (Sam Holden)
Re: The space deletion woes... <uri@camel.fastserv.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 15 Oct 1998 15:42:49 -0700
From: hermit@cats.ucsc.edu (William R. Ward)
Subject: Re: "strict subs" choking on method perl file handles
Message-Id: <waalnmhxx92.fsf@ese.UCSC.EDU>
"Alan Fahrner" <alan@chelz.com> writes:
> strict 'subs';
> open(FILEHANDLE,$file);
> $myobj->read(FILEHANDLE); # "read" method for $myobj's class
>
> I get the standard bareword error.
>
> I would rather not "no strict subs" or pass the file handle as a glob
> reference...which works...
>
> strict 'subs';
> open(FILEHANDLE,$file);
> $myobj->read(\*FILEHANDLE);
>
> I have looked and looked, even trying to peer into the perl code, but I
> can't see a way to declare or write my functions in the ".xs" or ".pm" file
> that would cause it to be happy.
The best way to get around this is to do:
use strict;
use IO::File;
my $fh = new IO::File $file or die "Can't open $file: $!\n";
$myobj->read($fh);
If you have 5.003 or earlier, use FileHandle instead of IO::File.
Either way, $fh is a blessed glob reference, so your read function
won't require any changes.
--Bill.
--
William R Ward Bay View Consulting http://www.bayview.com/~hermit/
hermit@bayview.com 1803 Mission St. #339 voicemail +1 408/479-4072
hermit@cats.ucsc.edu Santa Cruz CA 95060 USA pager +1 408/458-8862
PGP Key 0x2BD331E5; Public key at http://www.bayview.com/~hermit/pubkey.txt
-----------------------------------------------------------------------------
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Ben Franklin, ~1784
------------------------------
Date: 15 Oct 1998 22:58:46 +0100
From: chrisb@jesmond.demon.co.uk (Chris Benson)
Subject: Anyone for a Tyne+Wear.pm ??
Message-Id: <705r6m$pna@jesmond.demon.co.uk>
Keywords: Tyne & Wear, Perl Mongers, Self improvement, Socialising
I fear I may regret this but:-
Are there any other Perl uses in the Tyne+Wear area who would
like to meet to discuss the furthering of Perl in the area, develop
their Perl skills, or (even) have a sociable evening swapping IT
reminiscences?
The world is waiting to know!
--
Chris Benson
------------------------------
Date: Thu, 15 Oct 1998 22:43:41 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: Are there no PERL experts out there?? Is there no one who can solve this??
Message-Id: <36267C21.E2A6BBEF@shaw.wave.ca>
[posted & mailed]
Shawn Corey wrote:
>
> To match letters and whitespace: /^([a-zA-Z]|\s)*$/
You can (and should) use \s, \w, \d, etc. in character classes. It will
be much faster than alternation.
/^[a-zA-Z\s]*$/
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: 15 Oct 1998 18:10:24 -0400
From: Uri Guttman <uri@camel.fastserv.com>
Subject: Camel Pub (was Re: Raleigh.pm has registered)
Message-Id: <sarems9pjcf.fsf_-_@camel.fastserv.com>
>>>>> "E-A" == Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> writes:
E-A> Adam Turoff wrote:
>> >/me wonders what a 'camel pub' would be like....hmmmmm.
>>
>> A rundown dive bar in San Jose just off the main drag. What did you think
>> it would be like?
E-A> I said 'pub' not some skanky lounge. ;) I'm thinking maybe Davis or
E-A> Porter Square, Camel shaped lights, swizzle sticks, maybe a special
E-A> drink (The Wicked Dromedary?), brown fuzzy booths in the shape of a
E-A> camel, O'Reilly's on every table, TPJ's, maybe some sexy cocktail
E-A> waitresses, and most importantly a superb collection of the world's
E-A> finest single malt scotches and a fireplace with overstuffed leather
E-A> chairs. Hmmmm. I like this idea.
not that i encourage (or tolerate) smoking, but i acquired a camel brand
ashtray from a pub during one of the boston.pm meetings. it has a nice
etched camel in the glass bottom. so even though i wouldn't want smoking
in this pub (but you would!), at least use camel ashtrays.
maybe the menu could have camel burgers? and definitely some good
cognacs besides the scotches.
since it would have o'reilly's on every table, maybe they would be
interested in investing and expanding their empire?
uri
--
Uri Guttman Fast Engines -- The Leader in Fast CGI Technology
uri@fastengines.com http://www.fastengines.com
------------------------------
Date: 15 Oct 1998 23:15:53 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Combining two @array's
Message-Id: <705vn9$f8k$1@client3.news.psi.net>
al.woods@pbi.ab.ca (al.woods@pbi.ab.ca) wrote on MDCCCLXXI September
MCMXCIII in <URL:news:705od9$td3$1@nnrp1.dejanews.com>:
++ Afternoon,
++
++ I'm probably looking for a complex solution where a simple one is available
++ but is there an easy way to combine 2 @array's?
What do you mean, "combine"? Two arrays after each other? There are
several ways, with "push" being the most common. (The manual explains
the details).
Or do you want to do something else?
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
------------------------------
Date: Thu, 15 Oct 1998 21:56:16 GMT
From: lrosicky@my-dejanews.com
Subject: Compiling Perl compiler on AIX
Message-Id: <705r20$1t1$1@nnrp1.dejanews.com>
I am trying to install the perlcc on out AIX. Running make (after running
perl Makefile.PL) produces many messages like the ones bellow. Any hint
would be appreciated.
"byterun.h", line 161.5: 1506-334 (S) Identifier OPt_COP has already been
define d on line 157 of "/usr/local/lib/perl5/5.00502/aix/CORE/byterun.h".
"B.c", line 313.18: 1506-045 (S) Undeclared identifier main_cv.
"
Lanny
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 16 Oct 1998 09:16:12 +1000
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: encryption
Message-Id: <705vnt$c5c$1@godzilla.zeta.org.au>
In <705aut$650$1@news.NERO.NET> stanley@skyking.OCE.ORST.EDU (John Stanley) writes:
>In article <703edd$1h6@mozo.cc.purdue.edu>,
[...]
>>Do you want to perform a message digest? "use SHA;"
>I used SHA to create a message digest once. It was unreadable.
Isn't that the point?
--
Please excuse my spelling as I suffer from agraphia. See the URL in my
header to find out more.
------------------------------
Date: Thu, 15 Oct 1998 22:10:04 GMT
From: cstanley@SPAMSUCKSusit.net (minus the SPAMSUCKS) (Chris Stanley)
Subject: Re: help! trying to emulate server side includes...
Message-Id: <36267297.36861418@news.usit.net>
that did the trick. thanks a bunch!
On Wed, 14 Oct 1998 23:05:44 -0400, rjk@coos.dartmouth.edu (Ronald J
Kimball) wrote:
>minus the SPAMSUCKS <cstanley@SPAMSUCKSusit.net> wrote:
>
>> so basically, i need a pattern that will find:
>>
>> <!--#include virtual="FILENAME" -->
>>
>> and replace it with the contents of FILENAME.
>
>Assuming that the substring to match will be in exactly that form,
>here's one way to do it:
>
>s/<!--#include virtual="([^"]*)" -->/
> my $r;
> if (open(F,$1)) {
> $r = join '', <F>;
> } else {
> $r = "Unable to open $1: $!\n";
> # whatever error message is suitable
> }
> $r;
>/gie;
------------------------------
Date: Fri, 16 Oct 1998 02:00:05 GMT
From: wcb4@erols.com (William Byrd)
Subject: Re: help! trying to emulate server side includes...
Message-Id: <705uv5$ne7$1@autumn.news.rcn.net>
On Thu, 15 Oct 1998 22:10:04 GMT, cstanley@SPAMSUCKSusit.net (minus
the SPAMSUCKS) (Chris Stanley) wrote:
>that did the trick. thanks a bunch!
>
>On Wed, 14 Oct 1998 23:05:44 -0400, rjk@coos.dartmouth.edu (Ronald J
>Kimball) wrote:
>
>>minus the SPAMSUCKS <cstanley@SPAMSUCKSusit.net> wrote:
>>
>>> so basically, i need a pattern that will find:
>>>
>>> <!--#include virtual="FILENAME" -->
>>>
>>> and replace it with the contents of FILENAME.
>>
>>Assuming that the substring to match will be in exactly that form,
>>here's one way to do it:
>>
>>s/<!--#include virtual="([^"]*)" -->/
>> my $r;
>> if (open(F,$1)) {
>> $r = join '', <F>;
>> } else {
>> $r = "Unable to open $1: $!\n";
>> # whatever error message is suitable
>> }
>> $r;
>>/gie;
>
if you would like a perl script tht does several server side includes,
there is ne that comes with the xitami web server (which is free) just
do a search for it on the net. The server itself does not do SSI but
uses a perl scrit to simulate it.
Bill
------------------------------
Date: 15 Oct 1998 18:37:21 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Implementing an ordered queue
Message-Id: <705tf1$j2v$1@monet.op.net>
In article <NxqV1.8929$wV1.5889624@news2.voicenet.com>,
Matt Knecht <hex@voicenet.com> wrote:
>I will *not* receive records in the correct order. This is *not* a FIFO.
John Macdonald has an implementation of heaps in his CPAN directory.
That's probably what you should use here.
Queing an element into a heap: O(log n) time.
Querying the time that the next element should be processed: O(1) time.
Dequeueing an element from the heap: O(log n) time.
------------------------------
Date: Thu, 15 Oct 1998 18:29:47 -0400
From: Mark Cain <mark@uninetwork.com>
To: Larry Rosler <lr@hpl.hp.com>
Subject: Re: New to programming - New to Perl - LOST!!!!
Message-Id: <3626775B.B120E7D4@uninetwork.com>
Larry Rosler wrote:
> > http://www.ActiveState.com/ActivePerl/download/APi504e.exe
> >
>
> That URL doesn't work for me, nor the link one level up (to
> .../download/): "(Network Error: Connection refused)". And the one two
> levels up just talks about build 502.
>
> Maybe build 504 is Not Ready for Prime Time yet (or withdrawn).
>
Strange...
I just tried http://www.ActiveState.com/ActivePerl/download/APi504e.exe and
was 'told' the file did not exist. But, I downloaded it yesterday!
1 minute later I went to http://www.ActiveState.com/ActivePerl/download.htm
then typed over the 'download.htm' with 'download/APi504e.exe' and a
download dialog box opens asking me where to save the file.
After this, the URL
http://www.ActiveState.com/ActivePerl/download/APi504e.exe works!
As to whether or not it is ready for prime time I do not know. I do know
that downloading build 504 fixed a bug that I was experiencing in 502 with
NET::FTP.
Mark Cain
------------------------------
Date: 15 Oct 1998 23:20:14 GMT
From: ehp@gte.net (Ethan H. Poole)
Subject: Re: Odd error message with ActivePerl on Windows NT
Message-Id: <705vve$1vp$1@news-1.news.gte.net>
[Posted and Emailed] In article <y3gbtndfqg3.fsf@net.indra.com>,
webevent@MatadorDesign.com says...
>
>
>Hi,
>
>We have a client who, despite all of our remote hand holding, has been
>unable to get ActivePerl (or Perl for Win32) to work with IIS3.0
>(system NT 4.0 Opt 3.0). Currently, after fresh installs, every perl
>script returns the following error message:
>
>CGI Error
>The specified CGI application misbehaved by not returning a complete
>set
>of HTTP headers. The headers it did return are:
>Can't open perl script "??????????????????l???????????????????f":
>Invalid argument
>
>The scripts run as expected from within Windows NT. The registry
>entry is supposedly correct:
>
>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Sc
>ript Map
>
>c:\Perl\5.00502\bin\MSWin32-x86-object\perl.exe %s %s
>
>Any suggestions?
Are the scripts readable by IUSR_XXX or are they in restricted
(authenticated) directories? IIS 3.0 will generate an error similar to this
if you try to access a script in a restricted directory without having first
authenticed on an .html page.
--
Ethan H. Poole | Website Design and Hosting,
| CGI Programming (Perl & C)..
========Personal========= | ============================
* ehp @ gte . net * | --Interact2Day--
http://home1.gte.net/ehp/ | http://www.interact2day.com/
------------------------------
Date: Thu, 15 Oct 1998 17:24:22 -0400
From: "Viggers, Kevin (EXCHANGE:SKY:1P66)" <kviggers@americasm01.nt.com>
Subject: passing stdout/stderr from perl to java
Message-Id: <36266806.DD58F0BB@americasm01.nt.com>
I have developed a Java Gui that uses the runtime thread to execute a
perl script. The perl script executes yet another program using the
system routine. I am able to capture both the standard out and standard
error in Java, but as separate entities. I want to be able to capture
this information in the order it occurs. So, if a stdout message is
produced, followed by a stderr msg, followed by another stdout, I want
to somehow maintain the ordering of the messages and display it in the
Java gui. Because the java runtime thread has to finish before
returning to the main app, I end up with one object containing ALL the
stderr messages that occurred and another containing ALL the stdout msgs
that occurred, with no way of knowing the sequence of messages as a
whole.
--
Kevin Viggers TEL: (613)763-3834
Software Development Tools ESN: 393-3834
Nortel Networks (1P66) email: Kevin.Viggers@nortel.ca
------------------------------
Date: Thu, 15 Oct 1998 23:44:10 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: passing stdout/stderr from perl to java
Message-Id: <Pine.GSO.4.02A.9810151643290.26848-100000@user2.teleport.com>
On Thu, 15 Oct 1998, Viggers, Kevin (EXCHANGE:SKY:1P66) wrote:
> I want to be able to capture this information in the order it occurs.
Sounds as if you're worried about output buffering. Check the perlvar
manpage's entry on the $| variable. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 15 Oct 1998 18:04:03 -0400
From: "Paul Hirsch" <paulus@planetkc.com>
Subject: Re: Perl & window.open
Message-Id: <01bdf8ec$531e31e0$1c01020a@phirsch.hrblock.com>
> manufacturer, a product, and a URL if the manufacturer has one. What I am
> wanting to do is to have a new browser window open when the URL is
clicked. I
> am having no problem getting the URL to open in the existing window but
> whenever I try to use javascript to open a NEW window it isnt passing
along
> the perl variable, insteed all the URL entries open the same URL(ie both
> www.abcd.com and www.123.com open the same web site). Is what I am trying
to
> do possible or am I chasing a dream here? It sounds like it should work
but
> Ive been wrong before.
For the link to the new window, add a "TARGET" variable in the "A" HTML
tag.. for example:
A HREF="http://www.wowee.com/newwindow.html" TARGET="new_window"
I don't think it's a javascript function, (I don't like JavaScript much
myself) but it works with most browsers. Not sure what you mean by 'Perl
variable' but the code above should do the trick...
-Paul
------------------------------
Date: Thu, 15 Oct 1998 23:39:40 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl FAQ - error found in "#How_do_I_get_a_file_s_timestamp_"
Message-Id: <0JvV1.11$LH3.100661@nsw.nnrp.telstra.net>
In article <36266E13.A861C9E9@us.ibm.com>,
James Ludlow <ludlow@us.ibm.com> writes:
> In hindsight, I should have just emailed it to Tom. However, I don't
> see how pointing out an error in the documentation is somehow a sign of
> not "getting" free software.
The documentation is part of the perl distribution. A flaw in the
documentation is considered a bug, and should be reported. Perl relies
on the many users around the world to help making it a better package,
which includes patches to the documentation.
> If I didn't "get" free software, I'd be demanding that the error be
> fixed. And I'd probably be _amazed_ that the copy of the FAQ online
> isn't in synch with the copy in distribution.
There is a good reason for that. It's simply too much work the way
it's all set up at this point. Discussions about the how and why of
this can be found on dejanews.
Of course, if anyone wants to create a full html tree of all the
documentation, and make that available to replace the documentation at
www.perl.com, I suspect that that will be welcomed.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Think of the average person. Half of
Commercial Dynamics Pty. Ltd. | the people out there are dumber.
NSW, Australia |
------------------------------
Date: Fri, 16 Oct 1998 01:41:40 GMT
From: wcb4@erols.com (William Byrd)
Subject: perl script to keep dynamic server active and on-line
Message-Id: <705tsk$ime$1@autumn.news.rcn.net>
okay,
I have written some perl scripts to do basic maintenance and the
like under linux, but I am now working on a win95 box (please, don't
cringe) and have a rather small project that I know how to logically
do, but not exactly how to pull off under windows. Her's the idea.
I use monlith to assign wcb4.dyn.ml.org to my dynamically assigned IP
address (I use a dial up connect) but occassionally my ISP drops the
connect, which is a real pain, since I sometimes leave a web server
running on this machine so I can show people things running on my
server. I also would like this to be protection for me against the web
server (or any other server I run on this machine) from locking up.
What I already have:
-ping for win95
-a small program that restarts windows
-a batch command file that dials out, runs the servers I want, then
run dynamo to tell monolith (ml.org) what my new IP address is
What I want to do is this (in the perl script)
immediately upon running.....
-wait 1 minute (gives other programs time to start)
-check to see if the batch file to start the server and this script
are in the startup folder, if so, then delete them (this will only
happen upon recovering from a crash)
-wait 4 minutes
-ping wcb4.dyn.ml.org
-if the third line or the result begins with "Reply" then all is well
and just.....
- start over again.
- if a timeout is returned in the 3rd line of the resulting output,
then my server has locked or I have been dropped, in which case....
-copy the batch file that runs the server and this script
into the startup folder and
- run the program to reset windows (wonderfuil little program
that forces all programs to quit then restarts windows)
any ideas from you wonderful perl gurus (I'm sure there are opther
folks out there who are forced to run windows for various reasons who
have made peace with perl and windows 95
any help would be appreciated.
Bill/wcb4@erols.com
------------------------------
Date: Thu, 15 Oct 1998 23:48:13 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: perl script to keep dynamic server active and on-line
Message-Id: <Pine.GSO.4.02A.9810151645110.26848-100000@user2.teleport.com>
On Fri, 16 Oct 1998, William Byrd wrote:
> What I want to do is this (in the perl script)
> immediately upon running.....
>
> -wait 1 minute (gives other programs time to start)
Why not just start it after the other programs? But you could use sleep(),
if that's implemented in the Windows version of Perl. (It should be...)
> -check to see if the batch file to start the server and this script
> are in the startup folder, if so, then delete them (this will only
> happen upon recovering from a crash)
Perl can detect and delete files.
> -wait 4 minutes
This isn't much harder than what we did two steps earlier. :-)
> -ping wcb4.dyn.ml.org
Perl can call an external ping program.
> -if the third line or the result begins with "Reply" then all is well
> and just.....
> - start over again.
Perl can examine the output of a program.
> - if a timeout is returned in the 3rd line of the resulting output,
> then my server has locked or I have been dropped, in which case....
> -copy the batch file that runs the server and this script
> into the startup folder and
Perl can copy files.
> - run the program to reset windows (wonderfuil little program
> that forces all programs to quit then restarts windows)
Perl can run that program.
So, what's the problem? Why are you posting to Usenet instead of writing
this code? :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 15 Oct 1998 22:02:49 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has registered
Message-Id: <36266E86.9F7F1A0B@bbnplanet.com>
Adam Turoff wrote:
> >/me wonders what a 'camel pub' would be like....hmmmmm.
>
> A rundown dive bar in San Jose just off the main drag. What did you think
> it would be like?
I said 'pub' not some skanky lounge. ;) I'm thinking maybe Davis or
Porter Square, Camel shaped lights, swizzle sticks, maybe a special
drink (The Wicked Dromedary?), brown fuzzy booths in the shape of a
camel, O'Reilly's on every table, TPJ's, maybe some sexy cocktail
waitresses, and most importantly a superb collection of the world's
finest single malt scotches and a fireplace with overstuffed leather
chairs. Hmmmm. I like this idea.
e.
After all, the cultivated person's first duty is to
always be prepared to rewrite the encyclopedia. - U. Eco -
------------------------------
Date: 15 Oct 1998 18:12:52 -0400
From: ziggy@panix.com (Adam Turoff)
Subject: Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has registered
Message-Id: <705s14$4pf@panix.com>
Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
>I said 'pub' not some skanky lounge. ;) I'm thinking maybe Davis or
>Porter Square, Camel shaped lights, swizzle sticks, maybe a special
>drink (The Wicked Dromedary?), brown fuzzy booths in the shape of a
>camel, O'Reilly's on every table, TPJ's, maybe some sexy cocktail
>waitresses, and most importantly a superb collection of the world's
>finest single malt scotches and a fireplace with overstuffed leather
>chairs. Hmmmm. I like this idea.
Let's not forget the Pe[a]rl Sake, the oyster bar, roasted gecko,
good beer, or the mother-of-perl inlay at the bar.
Anyone opening a bar in Monterey this winter? :-)
Or maybe somewhere in Minnesota/Wisconson? That's pretty much where
'between Richard and Bill' tends to be situated these days.
Z.
------------------------------
Date: Thu, 15 Oct 1998 22:35:46 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has registered
Message-Id: <3626763F.CA62CEF7@bbnplanet.com>
Adam Turoff wrote:
> Let's not forget the Pe[a]rl Sake, the oyster bar, roasted gecko,
> good beer, or the mother-of-perl inlay at the bar.
That Pearl Sake you and Dave bought is disturbing. The mother-of-perl
inlay would have to be of Larry, of course. :)
> Anyone opening a bar in Monterey this winter? :-)
Hmmm...not a bad idea.
> Or maybe somewhere in Minnesota/Wisconson? That's pretty much where
> 'between Richard and Bill' tends to be situated these days.
MN? Nah, no good skiing for miles for all that snow.
e.
After all, the cultivated person's first duty is to
always be prepared to rewrite the encyclopedia. - U. Eco -
------------------------------
Date: 15 Oct 1998 15:36:05 -0700
From: Brad Murray <murrayb@vansel.alcatel.com>
Subject: Re: Raleigh.pm (Raleigh, NC, USA perl mongers) has registered
Message-Id: <uiuhlfo6i.fsf@vansel.alcatel.com>
ziggy@panix.com (Adam Turoff) writes:
> Let's not forget the Pe[a]rl Sake, the oyster bar, roasted gecko,
> good beer, or the mother-of-perl inlay at the bar.
Oh I think the place should be vegetarian. Why everyone is so interested
in roasting and eating their mascots, I will never understand. It just
doesn't seem right, somehow. The camel should be the bouncer.
--
BMurray "What they [young Americans] do have now is an unordered
SW Analyst tangle of rather ordinary passions, running through their
Alcatel consciousness like a monochrome kaleidoscope."
(Alan Bloom)
------------------------------
Date: Thu, 15 Oct 1998 17:48:15 -0400
From: "Viggers, Kevin (EXCHANGE:SKY:1P66)" <kviggers@americasm01.nt.com>
Subject: redirecting stderr to stdout
Message-Id: <36266D9F.223ACE8E@americasm01.nt.com>
I want to redirect stderr to stdout so that both stdout and stderr will
use the stdout filehandle. how do i do this?
--
Kevin Viggers TEL: (613)763-3834
Software Development Tools ESN: 393-3834
Nortel Networks (1P66) email: Kevin.Viggers@nortel.ca
------------------------------
Date: Thu, 15 Oct 1998 23:49:25 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: redirecting stderr to stdout
Message-Id: <Pine.GSO.4.02A.9810151648450.26848-100000@user2.teleport.com>
On Thu, 15 Oct 1998, Viggers, Kevin (EXCHANGE:SKY:1P66) wrote:
> I want to redirect stderr to stdout so that both stdout and stderr
> will use the stdout filehandle. how do i do this?
The method for duping a filehandle from the perlfunc manpage may do what
you want. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 15 Oct 1998 21:55:04 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Sorry
Message-Id: <705qvo$btt@mozo.cc.purdue.edu>
fl_aggie@thepentagon.com (I R A Aggie) writes:
}In article <705auh$pof@mozo.cc.purdue.edu>, gebis@fee.ecn.purdue.edu
}(Michael J Gebis) wrote:
}+ Sure you do. And it's the instructor's job to solve the problem
}+ _with_ the student, instead of _for_ the student. This is a subtle
}+ difference that often gets missed in this group, by both students and
}+ teachers.
}That's right. But there's another subtle little difference often over
}looked.
}The instructor gets paid for their time...
Of course. Nobody has the right to demand help on this group. If you
think that, you're going to be a bad student.
On the other hand, merely responding to a query doesn't automatically
qualify as helpful. If you think that, you're going to be a bad
teacher.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Thu, 15 Oct 1998 18:24:40 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Sorry
Message-Id: <fl_aggie-1510981824410001@aggie.coaps.fsu.edu>
In article <705qvo$btt@mozo.cc.purdue.edu>, gebis@fee.ecn.purdue.edu
(Michael J Gebis) wrote:
+ On the other hand, merely responding to a query doesn't automatically
+ qualify as helpful.
Well, it does cut off the complaint that "no one responded to my post".
James
------------------------------
Date: 15 Oct 1998 15:41:54 -0700
From: larry@kiev.wall.org (Larry Wall)
Subject: Re: Sorry
Message-Id: <705tni$jq@kiev.wall.org>
In article <362627ED.C42390AC@min.net>, John Porter <jdporter@min.net> wrote:
>Larry Wall wrote:
>>
>> Perl is worse than Python because people wanted it worse.
>
>Meaning "wanted it more badly", I take it?
I intended you to take it however you like. :-)
Larry
------------------------------
Date: Thu, 15 Oct 1998 15:25:10 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: The space deletion woes...
Message-Id: <MPG.10901624972f7c55989818@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <sarhfx5pkj7.fsf@camel.fastserv.com> on 15 Oct 1998 17:44:44
-0400, Uri Guttman <uri@camel.fastserv.com> says...
> >>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
...
> >> >> =~ s/\s+?//g;
> LR> ...
> LR> You're correct, *but* with the 'g' at the end the '+' is meaningless.
> >> ^
> >> larry,
> >>
> >> did you mean '?' ? the + is meaningful to get multiple spaces
Actually, with the 'g' at the end, the '+' is meaningless as I said (but
not as I meant :-), because just '?' would do it also (different mening
of '?'!).
#!/usr/local/bin/perl -w
use Benchmark;
$x = ' Here goes nothing one space now ';
timethese (1 << (shift || 0), {
All => sub { $_ = $x; s/\s+//g },
One => sub { $_ = $x; s/\s+?//g },
Ugh => sub { $_ = $x; s/\s?//g },
} );
__END__
Benchmark: timing 65536 iterations of All, One, Ugh...
All: 4 wallclock secs ( 3.72 usr + 0.00 sys = 3.72 CPU)
One: 6 wallclock secs ( 5.25 usr + 0.00 sys = 5.25 CPU)
Ugh: 13 wallclock secs (12.70 usr + 0.00 sys = 12.70 CPU)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 15 Oct 1998 22:43:46 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: The space deletion woes...
Message-Id: <slrn72cul1.ic.sholden@pgrad.cs.usyd.edu.au>
Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
>Mark D. wrote:
>
>> $cgi_client{'upfile'} =~ s/^\s+//;
>
>This says to match one or more spaces at the beginning of the line.
>Obviously that one worked looking at your result.
>
>> $cgi_client{'upfile'} =~ s/\s+$//;
>
>This says to match one or more spaces through the end of the line.
>
>> $cgi_client{'upfile'} =~ s/\s+/ /g;;
>
>This says to match one or more spaces and replace with one or two (can't
>tell). This one makes no sense really in context of the above...at least
>to me, then again I have no idea what you are trying to do here.
>
>=~ s/\s+?//g;
>
>This should do the trick for the top two. Uri and Larry I'm sure will
>correct me if I'm wrong here, but I did test it on a little snippet.
Missed the original post so I could be wrong but to me the substitutes
seem to be doing the following :
#1 - remopve leading whitespace
#2 - remove trailing whitespace
#3 - compress all remaining whitespace groups to a single space.
So " Hi there " => "Hi there"
Your last one would produce "Hithere" by removing all whitespace which
I doubt is what is required (although as I said I missed the first post).
--
Sam
Basically, avoid comments. If your code needs a comment to be
understood, it would be better to rewrite it so it's easier to
understand. --Rob Pike
------------------------------
Date: 15 Oct 1998 19:12:52 -0400
From: Uri Guttman <uri@camel.fastserv.com>
Subject: Re: The space deletion woes...
Message-Id: <sard87tpggb.fsf@camel.fastserv.com>
>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
LR> Actually, with the 'g' at the end, the '+' is meaningless as I said (but
LR> not as I meant :-), because just '?' would do it also (different mening
LR> of '?'!).
LR> #!/usr/local/bin/perl -w
LR> use Benchmark;
LR> $x = ' Here goes nothing one space now ';
LR> timethese (1 << (shift || 0), {
LR> All => sub { $_ = $x; s/\s+//g },
LR> One => sub { $_ = $x; s/\s+?//g },
LR> Ugh => sub { $_ = $x; s/\s?//g },
LR> } );
LR> __END__
LR> Benchmark: timing 65536 iterations of All, One, Ugh...
LR> All: 4 wallclock secs ( 3.72 usr + 0.00 sys = 3.72 CPU)
LR> One: 6 wallclock secs ( 5.25 usr + 0.00 sys = 5.25 CPU)
LR> Ugh: 13 wallclock secs (12.70 usr + 0.00 sys = 12.70 CPU)
ugh is right! as friedl would note, you have to match the null string
between each char and then on each \s as the \s? says to do as it is
greedy by default. it make sense that it is twice as slow as 'one'.
imagine doing this with \s?? ? i think it would fail since the shortest
match is always the null string.
uri
--
Uri Guttman Fast Engines -- The Leader in Fast CGI Technology
uri@fastengines.com http://www.fastengines.com
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3987
**************************************