[6449] in Perl-Users-Digest
Perl-Users Digest, Issue: 74 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 8 07:07:12 1997
Date: Sat, 8 Mar 97 04:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 8 Mar 1997 Volume: 8 Number: 74
Today's topics:
Re: 10 commandments (was re: Which one is the best (pat <tmh@possibility.com>
Re: [Q] Extract a regex (Jason C Austin)
Awk to perl (Winston Sia)
Re: Binary Upload to web.. (Administration)
Re: Can you create file on the fly with perl? (Jason C Austin)
Re: Chopping lines? <dbenhur@egames.com>
Re: Deamons (or Services) on WinNT--Anyone written any (Reinoud van Leeuwen)
Re: fork and alarm (Jason C Austin)
Free web site and instant down line! sbare@preferred.com
Re: Good Perl Book (Jeff Cope)
Re: Help with installing and using libwww (Nathan V. Patwardhan)
Re: HELP!?! - Perl from UNIX shell??? (Bob Wilkinson)
How does a script put something in STDIN? <ragoff@sandia.gov>
Re: How does a script put something in STDIN? <tchrist@mox.perl.com>
Re: How does a script put something in STDIN? <dbe@wgn.net>
Re: Knowing the pid of a fork()'ed child, really (Charles DeRykus)
Re: Newbie recursion question (Eric Bohlman)
Re: Perl 5.003, VI, and Toshiba T1000SE <dbe@wgn.net>
Perl5 and Windows 95 <keitha@surfnetiwd.com>
Re: Rounding Numbers in Perl <dbenhur@egames.com>
Search techniques? <j-adamson@tamu.edu>
Re: simple new question! <tchrist@mox.perl.com>
Socket timeout implementation on PERL5/Win32 without al (Gary)
Re: The importance of using good keys (I R A Aggie)
Use of uninitialized value at D:\PERL5\lib/Win32/ODBC.p (Parillo)
When will 5.004 be released? <jonas@cultcom.se>
Re: When will 5.004 be released? (Gurusamy Sarathy)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 07 Mar 1997 20:09:28 -0800
From: Todd Hoff <tmh@possibility.com>
Subject: Re: 10 commandments (was re: Which one is the best (pattern matching))
Message-Id: <3320E678.19E@possibility.com>
Mike Heins wrote:
>
> Todd Hoff (tmh@possibility.com) wrote:
> : Devin Ben-Hur wrote:
> :
> : > 11) Thou shall use use strict;
> :
> : Jeeze, might as well start using C++ for everything again.
> : Why turn perl into the no fun language?
> :
>
> That I disagree with -- I find it more fun to use strict. Perhaps you
> like debugging better than I do, though. 8-)
Nope, code usually works the first time. Not much debugging
needed.
---------------------------------------------------------------------
tmh@possibility.com | I have no interest in any ship that does
http://www.possibility.com | not sail fast, for I plan to go in
| harm's way. -- J.P. Jones
------------------------------
Date: 06 Mar 1997 16:53:09 GMT
From: jason@wisteria.cs.odu.edu (Jason C Austin)
Subject: Re: [Q] Extract a regex
Message-Id: <JASON.97Mar6115309@wisteria.cs.odu.edu>
In article <331AE698.67D4@knoll.hibu.no> Vegard Bakke <vegardb@knoll.hibu.no> writes:
=> I would like to "move" the matching pattern from a regex in
=> a string to a new variable.
=>
=> Lets use the three first random cahacters as an example ( /^.{3}/ ).
=> $OrgStr="1234567890";
=> $NewStr="";
=> In this example I would like the result to be:
=> $OrgStr="4567890";
=> $NewStr="123";
This seems to work:
$OrgStr=~s/(^.{3})/$NewStr=$1;''/e;
--
Jason C. Austin
austin@visi.net
------------------------------
Date: 8 Mar 1997 04:54:29 GMT
From: win@ph.net (Winston Sia)
Subject: Awk to perl
Message-Id: <5fqre5$cml@gomez.ph.net>
Dear Perl Experts:
How do I write the awk commands in Perl?
Below is a sample shell program which I intend to convert to Perl.
I'd appreciate any help.
----------------------------------------------------------
today=`date | awk '{print $3 $2 $6}'`
monthyr=`date | awk '{print $2 $6}'`
data=/usr/local/IPDATA
dir=/usr/local/IPACCT
mkdir -p $dir/oldLogs
for i in `cat $dir/mkt1.serial`
do
mkdir -p $data/tables/mkt1/` echo $i | tr '/' '.'`
awk '{print}' $data/logs/mkt1* | tr '\r' ' ' |\
awk -f $dir/mkt1.rule | grep $i |\
awk '{sub("/255","",$5)} {print $0}' |\
awk '{printf"%9s %3s %5s %5s %8s %15s %8s %15s\n",
$1, $2,substr($3,1,5), $5, $6, $7, $8, $9}' | sort +0 -1 +2 -3 >\
$data/tables/mkt1/` echo $i | tr '/' '.'`/$today
done
==========================================================
Below is the mkt1.serial file:
Serial0/1
Serial0/3
Serial0/7
Serial1/2
Serial1/3
Serial1/7
==========================================================
Below is the mkt1.rule file:
/GMT/{day=$1; mon=$2; date=$3; time=$4; year=$6} #set the date/time variable
/line/{printf"%s%s%s %s %s %8s ",date, mon, year, day, time,$1} #print date/time & interface
/load/{printf"%8s ", $13} #print loading
/packets input/{printf"%8s %12s ",$1,$4}
/packets output/{printf"%8s %12s\n ",$1,$4}
------------------------------
Date: 7 Mar 1997 17:09:30 GMT
From: admin@vci.net (Administration)
Subject: Re: Binary Upload to web..
Message-Id: <5fpi4a$a3v@apple.telalink.net>
I've got one I use here at work. I have it files (binary/text)
upload from a form to a specified directory on the web server.
The page is at http://www.vci.net/fup.htm .
If you like it I can send you the scripts. It uses cgi-lib.pl.
In article <01bc2b15$98a52a80$37931193@treeves.es.hac.com>,
areeves@goodnet.com says...
>
>Does anyone have code to do a file transfer from a users PC/Mac disk to a
>web location?
>
>I need to have an script that will allow me to let a user enter a file
>name, then trasnfer that file to a dir on my web server.. the file will be
>binary..
>
------------------------------
Date: 06 Mar 1997 16:53:49 GMT
From: jason@wisteria.cs.odu.edu (Jason C Austin)
Subject: Re: Can you create file on the fly with perl?
Message-Id: <JASON.97Mar6115349@wisteria.cs.odu.edu>
In article <5fes7m$e6f@news.webspan.net> exidor@nimbus.superior.net (Christopher Masto) writes:
=> In article <331A3BC8.FB37ADB@uconect.net>,
=> Bill Kuhn <wkuhn@uconect.net> wrote:
=> >> >system("touch $filename")
=> >>
=> >> $filename = "harmless; rm -rf /";
=> >
=> >Are you telling me that whatever I pass to system() will be executed, so
=> >I shouldn't pass it anything that I don't want executed? It will do
=> >exactly what I ask it to?
=>
=> Actually, I'm pointing out that the use of the one-argument system()
=> is very dangerous. Consider what could happen if the user were
=> prompted for that filename. It would do exactly what THEY ask it to.
=>
=> There is the option of system("touch", $filename), which avoids the
=> /bin/sh, and this this particular problem.
=>
=> You may be aware of this, but the gentleman who asked the original
=> question may not be, and since we don't know whence he gets his
=> filename, caution is indicated.
Not a big deal unless the program is setuid. Without setuid,
they can't damage anything they couldn't damage without the scripts.
Could possible be some danger with CGI is you are unwise and set some
file ownership to the CGI uid.
Despite claim I've heard that perl is an exception, it's
always a bad idea to make a script setuid. You've just have shown one
reason why.
--
Jason C. Austin
austin@visi.net
------------------------------
Date: Fri, 07 Mar 1997 13:29:07 -0800
From: Devin Ben-Hur <dbenhur@egames.com>
To: Ted Timmons <tedder@e-zone.e-z.net>
Subject: Re: Chopping lines?
Message-Id: <332088A3.7791@egames.com>
Jeffrey wrote:
> Ted Timmons <tedder@e-zone.e-z.net> wrote:
> |> I'd like to chop long lines so that they are around 70 characters. I
> |> don't need to worry about long/short line pairs (from having, say,
> |> 90-character lines) because of the application.
> |> Right now, I'm using something like this:
> |> $data equals some long string
> |> $data1 = substr ($data,0,70);
> |> $data = substr ($data, 70);
> |> print out $data1, start over (more or less)
> |>
> |> The problem is it doesn't chop on word breaks.
> How about this:
[snipped bunch of code]
What's wrong with?:
use Text::Wrap;
$Text::Wrap::columns = 70;
$wrapped_data = wrap('','',$data);
This is an old problem.
Of Course there's a pre-existing solution (Camel p.512).
--
Devin Ben-Hur <dbenhur@egames.com>
eGames.com, Inc. http://www.egames.com/
eMarketing, Inc. http://www.emarket.com/
"Sometimes you just have to step in it and see if it stinks" O-
-- Sonia Orin Lyris
------------------------------
Date: Sat, 08 Mar 1997 11:03:34 GMT
From: reinoud@xs4all.nl (Reinoud van Leeuwen)
Subject: Re: Deamons (or Services) on WinNT--Anyone written any?
Message-Id: <33214741.454273@news.xs4all.nl>
On Fri, 07 Mar 1997 16:00:14 -0500, Diana Duncan
<dduncan@realogic.com> wrote:
[...]
>So anyway, that is what I ended up doing. I must say, however, that
>DOS's AT functionality severely lags behind cron or UNIX at. I wanted
>my job to run every 10 minutes between 0700 and 1700. I had to schedule
>50+ seperate jobs to do this ;-)
So you created a Perl script that generated these? ;-)
__________________________________________________
Reinoud van Leeuwen reinoud@xs4all.nl
http://www.xs4all.nl/~reinoud
I specifically DO NOT give anyone permission to use my email adress
for any commercial or non commercial mailings. I will bill everyone
who sends me this kind of mail for wasting my time. Under Dutch law,
people who don't let me know they disagree with such a bill are obliged
to pay it.
------------------------------
Date: 06 Mar 1997 17:27:37 GMT
From: jason@wisteria.cs.odu.edu (Jason C Austin)
Subject: Re: fork and alarm
Message-Id: <JASON.97Mar6122737@wisteria.cs.odu.edu>
In article <5fgke7$892@nuscc.nus.sg> gohyewya@iscs.nus.sg (Yew Yap) writes:
=> Hi thanks for reading my posting, and please kindly mail me if u are
=> willing to help.
=>
=> Why after forking a child, alarm wont work any more?
The child keeps the signal handler settings, but fork() sets
the child's alarm() setting to 0. You'll have to reset it if you want
the child to get an alarm signal.
=> And after forking how to let the parent exit without waiting for the child?
You need to use the setsid() function. It makes the child
process a process group leader and releases the controlling terminal.
Here's an example:
use POSIX qw(setsid);
if (fork()==0) {
open(STDIN, "</dev/null");
open(STDOUT, ">>$logfile");
open(STDERR, ">&STDOUT");
setsid();
} else {
exit(0);
}
--
Jason C. Austin
austin@visi.net
------------------------------
Date: Thu, 6 Mar 1997 01:43:14
From: sbare@preferred.com
Subject: Free web site and instant down line!
Message-Id: <5fla8b$i7p$5687@news.preferred.com>
Register for a free internet downline and receive absolutely free, your own internet web site.
Sign up now and get a massive internet downline and a web page absolutely free. Its FREE!
Its Easy and it can be your answer to financial security. Visit my web site at
http://www.wwln.com/fido/data/063592076.html
and sign up now. Within a minute or less you will have an instant downline and be on your way
to a massive residual income.
------------------------------
Date: Fri, 7 Mar 1997 18:41:34 GMT
From: jeffcope@xgate.compaq.com (Jeff Cope)
Subject: Re: Good Perl Book
Message-Id: <E6orxC.8J7@twisto.eng.hou.compaq.com>
Hopefully no one goes and tries to order this book at this price. Readme.doc
has raised the price and will not honor the price listed in this article or
their web page either which also shows the same $18.71. I have never ordered
from this company before but it certainly doesn't give me a warm fuzzy about
doing business with them in the future.
In article <331f064d.15496215@news.digex.net>, rstewart@mars.superlink.net
(Bob Stewart) wrote:
>On 5 Mar 1997 16:56:17 GMT, "Ray Cadmus" <rcadmus@mcmsys.com> wrote:
>
>>Learning Perl by Randal Schwartz (O'Reilly)
>>
>
>We have this for 25% off list at:
>http://www.readmedotdoc.com
>
> Learning Perl
> by Schwartz, Randal L.
> ISBN: 1565920422
> Pub: O'REILLY & ASSOC., 1993, 246 pp.
> $24.95 Our Price: $18.71
>
> Perl is language for easily manipulating test, files and
>processes. It is available for UNIX and other operating
> systems free of charge,Contents of this book cover: A quick
>tutorial stroll through Perl inone lesson - Systematic,
> topic-by-topic coverage of Perl's broad capabilities - how to
>access nearly any UNIX system through Perl -
> how to use Perl with databases and much, much more
>
>
>We have 3,500 other books, all 20-35% off.
>
>http://www.readmedotdoc.com
------------------------------
Date: 8 Mar 1997 04:55:46 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Help with installing and using libwww
Message-Id: <5fqrgi$ccn@fridge-nf0.shore.net>
Michael Stearns (mstearns@darkwing.uoregon.edu) wrote:
: I am trying to make a socket connection to an http server. I abandoned
: my homespun beginner's script in favor of the libwww module but I fear I
: am in a deeper hole now.
Several things to consider:
(1) You need to install the Net, IO, and MD5 (?) modules before installing
LWP.
(2) You'll have to put an @INC at the top of your scripts that use LWP.
(3) You *can* install the Net/IO/etc modules in your own working area,
just pass the make program the right directory(ies) when you're building
LWP.
(4) Are you using perl -w?
(5) Why not try a GET request first, and try a host that's generally
reliable? Right now you're trying to negotiate a POST request. If
you read lwpcook.pod, you'll find some examples for GET.
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: Fri, 07 Mar 1997 14:15:06 -0500
From: b.wilkinson@pindar.co.uk (Bob Wilkinson)
Subject: Re: HELP!?! - Perl from UNIX shell???
Message-Id: <b.wilkinson-0703971415060001@ip57-york.pindar.co.uk>
In article <331fe632.3140332@news-the.forthnet.gr>,
steve@alexandros.cperi.forth.gr wrote:
> A simple question I hope - but I can't even get a basic PERL script or
> CGI to run from any UNIX shell. If I type in for example menu.cgi or
> menu at the prompt it would return menu.cgi - Command not found.
> I know the program works because it runs ok from within webpages.
> Thanks in advance.
> Steve
I suppose you've tried "echo $PATH". I bet that "." isn't there?
Try "./menu" or "./menu.cgi".
Bob
--
All is flux, nothing is still; nothing endures but change
- Heraclitus
------------------------------
Date: Fri, 07 Mar 1997 14:52:45 -0700
From: "Robert A. Goff" <ragoff@sandia.gov>
Subject: How does a script put something in STDIN?
Message-Id: <33208E2D.ABD@sandia.gov>
I need to read STDIN, analyze it, put something back into STDIN, then
call another process which will read STDIN.
print STDIN ... results in nothing in STDIN. I've checked the camel
book and the man pages and don't see the answer. Any suggestions would
be appreciated. Thanks.
--
=================================================
Robert Goff email: ragoff@sandia.gov
Sandia National Labs Phone: (505)284-3639
------------------------------
Date: 8 Mar 1997 05:22:37 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How does a script put something in STDIN?
Message-Id: <5fqt2t$4t$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"Robert A. Goff" <ragoff@sandia.gov> writes:
:I need to read STDIN, analyze it, put something back into STDIN, then
:call another process which will read STDIN.
:
:print STDIN ... results in nothing in STDIN. I've checked the camel
:book and the man pages and don't see the answer. Any suggestions would
:be appreciated. Thanks.
This is not in general possible. But if you have a TIOCSTI ioctl
on your system, you will be able to.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
/* we have tried to make this normal case as abnormal as possible */
--Larry Wall in cmd.c from the perl source code
------------------------------
Date: Sat, 08 Mar 1997 00:30:09 -0800
From: "$Bill Luebkert" <dbe@wgn.net>
To: "Robert A. Goff" <ragoff@sandia.gov>
Subject: Re: How does a script put something in STDIN?
Message-Id: <33212391.4899@wgn.net>
Robert A. Goff wrote:
>
> I need to read STDIN, analyze it, put something back into STDIN, then
> call another process which will read STDIN.
>
> print STDIN ... results in nothing in STDIN. I've checked the camel
> book and the man pages and don't see the answer. Any suggestions would
> be appreciated. Thanks.
That would make you a filter. You read STDIN, analyze it and
write it to STDOUT. STDOUT from you becomes STDIN for the next
process in the pipe. Eg:
foo | you | bar
You read STDIN which was written by foo to STDOUT, you write
to STDOUT and bar reads it as STDIN.
CC: "Robert A. Goff" <ragoff@sandia.gov>
--
,-/- __ _ _ $Bill Luebkert
(_/ / ) // // DBE Collectibles
/ ) /--< o // // http://www.wgn.net/~dbe/
-/-' /___/_<_</_</_ Email: dbe@wgn.net
------------------------------
Date: Fri, 7 Mar 1997 19:13:26 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Knowing the pid of a fork()'ed child, really
Message-Id: <E6otEE.BL9@bcstec.ca.boeing.com>
In article <331D8DCB.43E7@fnal.gov>, Elliott McCrory <mccrory@fnal.gov> wrote:
>perl 5.0003 qeustion under Solaris 2.4/2.5 (SPARC).
>
>fork() returns the pid of the child to the parent. I need the pid for a
>status file which I must maintain for similar processes. The trouble is
>that exec() does not *always* make the process run under the same pid #
>as what the fork returns. For example, if you do `exec("some-process
>2>errorlog")` (which is exactly the sort of thing I need to do,
>otherwise the STDERR messages from some-process get spewed around the
>system), exec() recognizes the ">" shell metacharacter and says "sh -c
>some-process 2>errorlog" (in this case), creating a new pid number.
>MOST of the time, the pid is "fork() + 1", but some of the time it is
>"fork()+2", and some (rarer) time, "fork()+3", and probably so on.
>
>How can I deal with this so that the parent process really knows what
>the pid of the process is that I need? I have a workaround now that
>when "fork()+1" is not found, it tries "fork()+2", but is still fails if
>the pid goes to "fork()+3".
>
you could launch your process with a double exec so the
child shell's pid was overlaid, e.g.,
if ($pid = fork) { # parent
} elsif (defined $pid) {
exec "exec some_process 2>&1" or die "exec failed: $!\n";
....
Once exec'ed, "some_process" will run under process $pid.
It's been a long week but I think this'll work :)
HTH,
--
Charles DeRykus
ced@carios2.ca.boeing.com
------------------------------
Date: Sat, 8 Mar 1997 02:59:24 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Newbie recursion question
Message-Id: <ebohlmanE6pEz0.4DB@netcom.com>
Graham Cant (citadel@dircon.co.uk) wrote:
: Can anyone tell me what is wrong with this piece of code:
[snip]
: sub tree {
: local($d,$e) = ($_[0],$_[1]);
^^^^^
This is most likely the problem; see below.
: print "called tree with $d,$e\n";
: if ($e !=0) {
: $e=$e-1;
: &tree($m{$d},$e);
: print "returned $d,$e\n";
: &tree($f{$d},$e);
: print "returned $d,$e\n";
: }
: }
: I'm trying to make a depth first search, and although the code works fine
: in BASIC, Perl hates it. I can't get it to transverse back up the tree!
: On the way down to the first branch the code behaves as expected, but the
: values I get on the way back are garbage.
Try using my instead of local. A local variable is in scope for any
subroutine called from the block it's declared in, so when you
recursively invoke tree, this assignment is trashing the caller's copies
of $d and $e. With my, on the other hand, the recursive invocation would
get its own copies of them.
------------------------------
Date: Fri, 07 Mar 1997 23:47:52 -0800
From: "$Bill Luebkert" <dbe@wgn.net>
To: "Jack L. Owens" <jlowens@ptconnect.infi.net>
Subject: Re: Perl 5.003, VI, and Toshiba T1000SE
Message-Id: <332119A8.7EDD@wgn.net>
Jack L. Owens wrote:
>
> Someone gave me a Toshiba T1000SE along with all of the manuals and
> documentation. I have been able to avoid laptops to this point but FREE
> is FREE. Admittedly, this is a very limited machine, but should be
> suitable for taking along on short two or three day trips. Does anyone
> one know what and where compact DOS 3.30 programs for PERL or VI might
> be obtained?
vi is available with the Mortice Kerns tools, or you can get
vim (an excellent superset) from here:
http://www.math.fu-berlin.de/~guckes/vim/
http://www.halcyon.com/gvr/vim.html
I believe the second one is DOS/win32.
Also check out the Cygnus site:
http://www.cygnus.com/misc/gnu-win32/
for utilities, GNU stuff, etc.
--
,-/- __ _ _ $Bill Luebkert
(_/ / ) // // DBE Collectibles
/ ) /--< o // // http://www.wgn.net/~dbe/
-/-' /___/_<_</_</_ Email: dbe@wgn.net
------------------------------
Date: 8 Mar 1997 08:13:30 GMT
From: "Keith Ainsley" <keitha@surfnetiwd.com>
Subject: Perl5 and Windows 95
Message-Id: <01bc2b98$7791d2c0$2f4cfccd@ppp-2-47.exis.net>
Hi Folks. Hopefully someone here can help me.
Has anyone used the software from the book Teach yourself Perl5 in 21days
on Windows 95? I'm having trouble getting the software properly loaded or
it just could be "operator error." If you have experience with this please
email me.
Thanks in advance!
--
Keith Ainsley
Surf-Net. Innovative Web Designs. http://www.surfnetiwd.com/
------------------------------
Date: Fri, 07 Mar 1997 13:45:38 -0800
From: Devin Ben-Hur <dbenhur@egames.com>
To: sunny@mem.net
Subject: Re: Rounding Numbers in Perl
Message-Id: <33208C82.2F3@egames.com>
Dan Davis wrote:
> scores off to just 2 or 3 significant digits. The problem
> is, I havent been able to find anything in Perl that rounds
> floating point numbers. For that matter, I havent found
> anything that will even truncate them. Am i missing
> something here?
Check out sprintf()
man perlfunc or Camel p.222
--
Devin Ben-Hur <dbenhur@egames.com>
eGames.com, Inc. http://www.egames.com/
eMarketing, Inc. http://www.emarket.com/
"Sometimes you just have to step in it and see if it stinks" O-
-- Sonia Orin Lyris
------------------------------
Date: Fri, 07 Mar 1997 10:33:13 -0800
From: John Adamson <j-adamson@tamu.edu>
Subject: Search techniques?
Message-Id: <33205F69.260D@tamu.edu>
Not knowing much (anything!) about various search algorithms, I'm in
hopes somebody here can offer suggestions.
I've got a flat file with fixed no. of fields per record, each field
delimited with "," and variable length fields. All I know to do at this
point is read through the file a record at a time and use something like
m/matching text/. This works but is kinda slow.
I've heard of things like binary tree searches - there are probably lots
of others - but don't know how they work or which are applicable. Any
pointers will be appreciated. One other thing: I can't use any kind of
probabilistic searching because this is an accounting-oriented
application so I've got to find *everything* that meets a search
criterion. Can't be satisfied with a 90 or 95% probable list of all
possible matches. Is a sequential search my only alternative? TIA.
John Adamson
j-adamson@tamu.edu
------------------------------
Date: 8 Mar 1997 03:29:59 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: simple new question!
Message-Id: <5fqmfn$o31$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
webster@dozyrosy.demon.co.uk writes:
: $true = 1;
: $false = 0;
: $abc = $false; # or whatever, to start with
Bad idea. Get used to 0 and '' being false, all else being true.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"It is easier to port a shell than a shell script."
--Larry Wall
------------------------------
Date: Sat, 08 Mar 1997 08:21:07 GMT
From: gniemcew@dti.net (Gary)
Subject: Socket timeout implementation on PERL5/Win32 without alarm() (since it's not implemented ) ?
Message-Id: <332220b9.1220444@news.alt.net>
Hi !
Say I am connecting to a server as a client, I create a socket, bind
and connect successfully, but the server sends nothing for a long
while. My client is of course stuck at
$var = <SOCKET>;
How do I implement a timeout ? I know how to do it with alarm(), but
since it's not implemented in PERL/Win32 (as well as fork() )...
Greetings to all,
Gary
------------------------------
Date: Tue, 04 Mar 1997 12:57:32 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: The importance of using good keys
Message-Id: <fl_aggie-ya02408000R0403971257320001@news.fsu.edu>
In article <5fhmaa$199@news.webspan.net>, exidor@nimbus.superior.net
(Christopher Masto) wrote:
+ I don't know if this URL is stateless or not, so if it doesn't work, go
+ to amazon.com and search for Programming Perl.
Well, when you search for "Wall, Larry" you get:
Achieve Your Dreams; Kathleen Russell, Larry Wall;
Money: Now You Have It, Now You Don't; Kathleen Russell, Larry Wall;
Programming Perl; Larry Wall, et al; Paperback;
The Road to Success Is Always Under Construction; Larry Wall, Kathleen
Russell;
Are You Richer Than You Think?; Kathleen Russell, Larry Wall;
Hausa Medicine: Illness and Well Being in a West African Culture; L.
Lewis Wall;
Practical Urogynecology; L. Lewis, M.D. Wall, et al;
Is Larry's middle name 'Lewis'?
James - :>
--
Consulting Minster for Consultants, DNRC
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: 7 Mar 1997 16:45:18 GMT
From: lparillo@newshost.li.net (Parillo)
Subject: Use of uninitialized value at D:\PERL5\lib/Win32/ODBC.pm
Message-Id: <5fpgmu$e2r@linet06.li.net>
The code fragment below gives me a perl error:
Use of uninitialized value at D:\PERL5\lib/Win32/ODBC.pm line 238.
every time through the while loop except for the first iteration.
Is it possible that there is an undeclared variable in DataHash.
I have been putting print statements trying to find were the error is.
Any Ideas? TIA
#
# Fetch all rows
#
while($db->FetchRow()) {
undef %Data;
print "<P>Before the datahash</P><HR>";
%Data = $db->DataHash();
print "<P>After the datahash</P><HR>";
print "<P>db = ", $db, "</P>";
foreach $key (keys(%Data)) {
print "<P>", $key, " = ", $Data{$key}, "</P>";
}
}
------------------------------
Date: Fri, 07 Mar 1997 16:08:24 -0800
From: Jonas Liljegren <jonas@cultcom.se>
Subject: When will 5.004 be released?
Message-Id: <3320ADF8.FF6@cultcom.se>
I want to use Fast CGI. It says that I should have at least perl version
5.003_02. The latest version I found was 5.003_92. But I can wait a week
or soo maby if there is coming a stable version soon.
--
/ Jonas Liljegren
http://w3.adb.gu.se/~a95jonas/welcome.html
Geek Code 3.1 GIT/P/Od-s+:-a24C++US++P++LEW++N++
o?K?w!oM!VPSPE-Y--PGP-t+5X++R@tv+b+!DID++Geh!!r!y+
------------------------------
Date: 8 Mar 1997 05:30:53 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: When will 5.004 be released?
Message-Id: <5fqtid$nil$1@news.eecs.umich.edu>
[ mailed and posted ]
In article <3320ADF8.FF6@cultcom.se>,
Jonas Liljegren <jonas@cultcom.se> wrote:
>I want to use Fast CGI. It says that I should have at least perl version
>5.003_02. The latest version I found was 5.003_92. But I can wait a week
>or soo maby if there is coming a stable version soon.
Last I heard, Chip Salzenberg (the current Atlas of perldom) was planning a
public beta release RSN. He's had his three golden apples now, had
to eat chocolate floppies, and even changed his name recently in this
effort[*]. :-) Perhaps the fourth (5.003_93) could be it.
5.004 should follow after the public beta phase. No one that I know knows
anyone who knows how long that'll be. Depends on how many crippling bugs
the public find, I suppose.
- Sarathy.
gsar@umich.edu
[*] c.f. perl5.003_92/Changes
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 74
************************************