[12405] in Perl-Users-Digest
Perl-Users Digest, Issue: 6005 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 15 17:07:24 1999
Date: Tue, 15 Jun 99 14:00:33 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 15 Jun 1999 Volume: 8 Number: 6005
Today's topics:
Re: @INC bizarreness jwwilhit@my-deja.com
Re: Afraid to ask about Y2K! (Jerome O'Neil)
Re: Afraid to ask about Y2K! <droby@copyright.com>
Re: Afraid to ask about Y2K! (Malcolm Ray)
Re: Afraid to ask about Y2K! (Bart Lateur)
Re: Afraid to ask about Y2K! <tchrist@mox.perl.com>
Re: Afraid to ask about Y2K! <upsetter@ziplink.net>
Can't load DBI modul under SCO UNIX <bakulin@eximb.kiev.ua>
Re: Dynamic Regular Expression (Bart Lateur)
Re: Dynamic Regular Expression <uri@sysarch.com>
Executing a unix command from Perl <sekoon@siteconnect.com>
Re: Executing a unix command from Perl (brian d foy)
Re: File Processing (Dave Cross)
Re: File Uploading via html form <uucon@my-deja.com>
Re: Fix this uglyness <macintsh@cs.bu.edu>
Re: Fix this uglyness <tchrist@mox.perl.com>
Re: Fix this uglyness <macintsh@cs.bu.edu>
Help needed !!!!!!! <silver98@lycosmail.com>
Re: Help needed !!!!!!! dalehend@flash.net
Re: Help needed !!!!!!! (brian d foy)
How do I pass variables from the command line please? cmfinlay@magnet.com.au
Re: How do I pass variables from the command line pleas <tchrist@mox.perl.com>
Re: How do I pass variables from the command line pleas (Jessica Fosler)
Re: How do I pass variables from the command line pleas <tchrist@mox.perl.com>
Re: How do I trim a string? (Tad McClellan)
How to scan a directory and put all the files and their <dazimi@yahoo.com>
Re: How to scan a directory and put all the files and t (Greg Bacon)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 15 Jun 1999 17:06:15 GMT
From: jwwilhit@my-deja.com
Subject: Re: @INC bizarreness
Message-Id: <7k615u$rn9$1@nnrp1.deja.com>
Thanks for the help...There were two different versions of perl running.
-Jason
In article <1dtetvd.b2wamg1s2i96oN@p24.tc2.metro.ma.tiac.com>,
rjk@linguist.dartmouth.edu (Ronald J Kimball) wrote:
> Uri Guttman <uri@sysarch.com> wrote:
>
> > you obviously have 2 different installed perl's there. carefully
check
> > for perl on your path and the one used in the shebang line.
> >
> > run a plain perl -V and /usr/sbin/perl -V (and any other paths to
perl)
> > and look at the results.
> >
>
> And here's a useful script by Tom Christiansen for finding all those
> perls (or whatever executable you're looking for) in the path.
>
> #!/usr/local/bin/perl
> # wh - like which, but find all in path.
> foreach $file (@ARGV) {
> for $dir (split(/:/,$ENV{'PATH'})) {
> print $path,"\n" if -f ($path="$dir/$file") && -x _;
> }
> }
>
> --
> _ / ' _ / - aka -
> ( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
> /
http://www.tiac.net/users/chipmunk/
> "It's funny 'cause it's true ... and vice versa."
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 15 Jun 1999 18:14:32 GMT
From: jeromeo@atrieva.com (Jerome O'Neil)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7k6568$ehr$1@brokaw.wa.com>
>> Many people really seem to think that civilisation will end at jan 1,
>> 2000, 12 AM.
>
> How can 12 be "AM"? If you mean 00:00, which you presumably do, then
> it's exactly half way between two middays, so it's no more accurate to
> call it before midday than after midday; and if it's 12:00 then it's
> neither before nor after: it _is_ midday! and the disaster, whatever it
> may be, will already be underway.
>
> Anyway, the new millennium doesn't start till a year later.
This thread is now one pedant long.
O'Neil's corollary at work.
:->
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: Tue, 15 Jun 1999 17:22:35 GMT
From: Don Roby <droby@copyright.com>
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7k624d$s4c$1@nnrp1.deja.com>
In article <37687326.33785850@news.skynet.be>,
bart.lateur@skynet.be (Bart Lateur) wrote:
> I doubt if TomC is really referring to use of Deja.com or
DejaNews.com.
> I'd rather think he means the "news reader" that's built into a web
> browsers like as Netscape, and which, even when compared to for
example
> (Free) Agent, is pretty crappy.
>
So is deja.com/dejanews.com when used for newsreading/posting. As a
search engine/archive it's great.
--
Don Roby, ingrate
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 15 Jun 1999 20:23:56 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <slrn7mddis.17s.M.Ray@carlova.ulcc.ac.uk>
On Tue, 15 Jun 1999 14:22:49 GMT, finsol@ts.co.nz <finsol@ts.co.nz> wrote:
>Thankyou for being one of the contributors to this newsgroup to
>acknowledge that Perl programs do need to be audited for Y2K problems.
>Mostly the response has been:
>
>a) Only idiots would make Y2K errors and they shouldn't be programming
>anyway and they deserve everything they get if they get it wrong.
Straw man. The point made repeatedly here is that the error you
refer to with your 'booby trap' mantra is a novice error, and is
likely to be accompanied by other novice errors which will make
the code fragile in other ways - a point I demonstrated by pointing
out other errors in the three applications you identified recently.
(Incidentally, the program associated with one of the URLs you gave
did not contain the code you attributed to it, as I discovered when I
followed it up with the author. This was sloppiness on your part).
What does it mean to say that "they deserve everything they get"?
In most of these cases the victim will not be the original author.
As with all software, it's a case of caveat emptor: if you use
applications written by less able programmers, sooner or later you'll
probably have problems. See below.
>b) Why just check for Y2K problems - what about all the others? Might as
>well not bother.
Straw man. I don't see anyone saying that you shouldn't bother
checking for Y2K problems. Of *course* you should check any software
you rely on, and Perl makes this easier. See below.
>c) Nothing significant is programmed in Perl.
Straw man. I don't recall seeing that claim made often in clpm.
It's not a position which a Perl advocate is likely to take. Now,
if you were to say that no nuclear power stations or life support
machines are controlled by Perl code, you'd be on firmer ground.
>d) Perl is Y2K compliant so therefore the code will not require a Y2K
>audit.
Straw man. How often have you seen this claim? My pencil has no Y2K
problems, but that doesn't mean any code I wrote with it doesn't need
to be audited.
For the user organisation (as opposed to the code producer), the Y2K
problem is conceptually very simple. You have a quantity of code, any
of which could potentially have Y2K problems, and you have 3 choices:
1. Trust a statement from the vendor/author that the code is free of
such problems.
2. Test the code. In practice, you'll probably do this even if you
have a vendor statement, if the code is important to you.
3. Wait and see. This may be a sensible option for non-critical
applications.
Perl applications are no different in this respect, except that you
usually have a free bonus option:
4. Examine the code.
Most Perl applications are distributed in source form. Your 'booby
trap' problem consists of precisely two functions. As you have
demonstrated, problematic calls to these can be easily searched for,
and, as you have admitted, fixing faulty use of them is simple.
I first used localtime nearly 20 years ago, if memory serves, and of
course it was around before then. It has found its way onto various
non-Unix systems since then. During the lifetime of localtime, an
awful lot of code has been written which uses it, and an indeterminate
amount of this will be buggy. Is Perl more susceptible to this problem
than, say, C? No: there's nothing about the language which makes it
structurally more likely that localtime will be misused in Perl than
in C. Are there more faulty Perl programs than faulty C programs?
I don't know, and neither do you. What we *do* know is that,
with Perl, a greater proportion of those programs will be easily
verifiable by the end user, and that the fix for your 'booby trap'
is almost invariably very simple.
This transparency doesn't endear Perl to those who seek to spread FUD
about Y2K. I suppose I could sell expensive consultancy services
to Perl users, but when they realised how simple the process was,
the game would be up. When I mailed the authors of those three
faulty programs you identified (something you didn't bother to do),
it probably took about five minutes (because I didn't have a form
letter prepared). None of them needed further assistance.
Caveat emptor. I recently sent a lengthy diatribe to a (big name)
vendor about an (expensive) application which was riddled with security
problems. Novice errors again. I could find these because I knew
what to look for, but since it was distributed as binary only (it is
written in C) I don't know what other lurking horrors it may contain.
I don't have this worry with our Perl applications.
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: Tue, 15 Jun 1999 20:33:53 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <3766b4d8.7739536@news.skynet.be>
Alan J. Flavell wrote:
>How can 12 be "AM"?
Tell that to the designers of my digital clock. They took special care
so that midnight displays as "12 AM", and midday as "12 PM".
Bart.
------------------------------
Date: 15 Jun 1999 14:51:59 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Afraid to ask about Y2K!
Message-Id: <3766bcef@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
bart.lateur@skynet.be (Bart Lateur) writes:
:Tell that to the designers of my digital clock. They took special care
:so that midnight displays as "12 AM", and midday as "12 PM".
I was always taught that noon is 12am, midnight is 12pm.
Of course, that's wrong, because noon and midnight are neither,
being between the two. Apparently I had one-based not zero-based
trainers. :-)
--tom
--
"Perl is to sed as C is to assembly language." -me
------------------------------
Date: Tue, 15 Jun 1999 20:52:57 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Afraid to ask about Y2K!
Message-Id: <J2z93.5831$nn.1063383@news.shore.net>
Malcolm Ray <M.Ray@ulcc.ac.uk> wrote:
:>b) Why just check for Y2K problems - what about all the others? Might as
:>well not bother.
: Straw man. I don't see anyone saying that you shouldn't bother
: checking for Y2K problems. Of *course* you should check any software
: you rely on, and Perl makes this easier. See below.
Actually, this one did come up. I recall a regular on this group posting
that you might as well check your programs for the proper use of "print"
or "abs" as check for y2k problems.
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Tue, 15 Jun 1999 21:46:33 +0300
From: "Boris Bakulin" <bakulin@eximb.kiev.ua>
Subject: Can't load DBI modul under SCO UNIX
Message-Id: <2.07b3.21JJP.FDDTHL@eximb.kiev.ua>
Error at the 'make test' time
CGI/SpeedyCGI/SpeedyCGI.a
/usr/local/lib/perl5/site_perl/5.005/i386-sco_sv/auto
/Bit/ShiftReg/ShiftReg.a
/usr/local/lib/perl5/site_perl/5.005/i386-sco_sv/auto/
BSD/Resource/Resource.a
/usr/local/lib/perl5/5.00502/i386-sco_sv/auto/re/re.a
/usr/local/lib/perl5/5.00502/i386-sco_sv/auto/attrs/attrs.a
/usr/local/lib/perl
5/5.00502/i386-sco_sv/auto/Socket/Socket.a
/usr/local/lib/perl5/5.00502/i386-sc
o_sv/auto/SDBM_File/SDBM_File.a
/usr/local/lib/perl5/5.00502/i386-sco_sv/auto/P
OSIX/POSIX.a /usr/local/lib/perl5/5.00502/i386-sco_sv/auto/Opcode/Opcode.a
/us
r/local/lib/perl5/5.00502/i386-sco_sv/auto/NDBM_File/NDBM_File.a
/usr/local/lib
/perl5/5.00502/i386-sco_sv/auto/IPC/SysV/SysV.a
/usr/local/lib/perl5/5.00502/i3
86-sco_sv/auto/IO/IO.a
/usr/local/lib/perl5/5.00502/i386-sco_sv/auto/Fcntl/Fcnt
l.a /usr/local/lib/perl5/5.00502/i386-sco_sv/auto/DynaLoader/DynaLoader.a
/usr
/local/lib/perl5/5.00502/i386-sco_sv/auto/Data/Dumper/Dumper.a
/usr/local/lib/p
erl5/5.00502/i386-sco_sv/auto/B/B.a
/usr/local/lib/perl5/5.00502/i386-sco_sv/COR
E/libperl.a `cat blib/arch/auto/DBI/extralibs.all` -lintl -lsocket -lnsl
-lndbm
-ldbm -lld -lm -lc -lcrypt -lPW -lx
undefined first referenced
symbol in file
boot_CGI__SpeedyCGI ./perlmain.o
getrusage
/usr/local/lib/perl5/site_perl/5.005/i386-sc
o_sv/auto/BSD/Resource/Resource.a
ld fatal: Symbol referencing errors. No output written to perl
*** Error code 13 (bu21)
*** Error code 1 (bu21)
Any help
Boris
------------------------------
Date: Tue, 15 Jun 1999 20:33:55 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Dynamic Regular Expression
Message-Id: <3768b586.7913374@news.skynet.be>
Uri Guttman wrote:
>because you are evaling a module once for its code. in your regex thing,
>you might eval once per loop to create regexes.
Nope. Look at the code. eval() is used ONCE to create a testing sub. It
is then called evcery time in the loop. It's exactly the same thing.
> $rx1 = qr/a+b/ ;
> $rx2 = qr/c?d+/ ;
>
> m/$rx1$rx2/ ;
>
>that can solve your 'and' problem too.
It's not the same thing. Matching is occurence order dependent. Nobody
asked for "a+b" to appear before "c?d+".
The solution Abigail brought forward looks like a better alternative. My
variation:
m/^(?=.*$rx1)(?=.*$rx2)/s
Bart.
------------------------------
Date: 15 Jun 1999 16:45:17 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Dynamic Regular Expression
Message-Id: <x7g13tfb1e.fsf@home.sysarch.com>
>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:
BL> Uri Guttman wrote:
>> because you are evaling a module once for its code. in your regex thing,
>> you might eval once per loop to create regexes.
BL> Nope. Look at the code. eval() is used ONCE to create a testing sub. It
BL> is then called evcery time in the loop. It's exactly the same thing.
no it isn't. look at what i said. eval has to compile the entire sub
code including the regexes. qr// only has to compile the regexes. and it
is much simpler to write and debug with qr than eval. i have done the
eval for regexes thing before and won't go back to it now that qr// is here.
>> $rx1 = qr/a+b/ ;
>> $rx2 = qr/c?d+/ ;
>>
>> m/$rx1$rx2/ ;
>>
>> that can solve your 'and' problem too.
BL> It's not the same thing. Matching is occurence order dependent. Nobody
BL> asked for "a+b" to appear before "c?d+".
those were dummy examples just to show that you can interpolate qr//
into rgeexes without the cost of recompiling. they could have the regex
code below if you wish and they can be reused in other variations of needed.
BL> m/^(?=.*$rx1)(?=.*$rx2)/s
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Tue, 15 Jun 1999 12:31:22 -0700
From: "Steve E. Koon" <sekoon@siteconnect.com>
Subject: Executing a unix command from Perl
Message-Id: <929475457.882.12@news.remarQ.com>
I am trying to execute a the "cp" in Linux from within my perl script. I
know I should be able to find this in my Perl 5 Hot-To book, but call me
stupid, I didn't.
Thanks,
------------------------------
Date: Tue, 15 Jun 1999 16:52:05 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Executing a unix command from Perl
Message-Id: <brian-ya02408000R1506991652050001@news.panix.com>
In article <929475457.882.12@news.remarQ.com>, "Steve E. Koon" <sekoon@siteconnect.com> posted:
> I am trying to execute a the "cp" in Linux from within my perl script. I
> know I should be able to find this in my Perl 5 Hot-To book, but call me
> stupid, I didn't.
system()
or why not
use File::Copy;
?
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Tue, 15 Jun 1999 18:43:47 GMT
From: dave@dave.org.uk (Dave Cross)
Subject: Re: File Processing
Message-Id: <37669e5c.44980279@news.demon.co.uk>
On Tue, 15 Jun 1999 08:22:21 -0700, lr@hpl.hp.com (Larry Rosler)
wrote:
>[Posted and a courtesy copy sent.]
>
>In article <37661890@newsread3.dircon.co.uk> on 15 Jun 1999 10:10:40
>+0100, Jonathan Stowe <gellyfish@gellyfish.com> says...
>...
>> my $r
>> while($r = <FILE>)
>> {
>> print $r;
>> }
>
>You are missing a semicolon there. But what you really want for those
>five lines is:
>
> print while <FILE>;
>
>See how many characters that saved!
Yeah, but why waste all those characters in the middle.
print <FILE>;
Dave...
--
Dave Cross <dave@dave.org.uk>
<http://www.dave.org.uk>
------------------------------
Date: Tue, 15 Jun 1999 19:24:56 GMT
From: Ryan Corder <uucon@my-deja.com>
Subject: Re: File Uploading via html form
Message-Id: <7k699q$v4o$1@nnrp1.deja.com>
Thanx everyone for you help! I downloaded some documentation on CGI.pm and
read up on all its features. I am now one step closer to getting my project
done! Thanks again!
ryan
In article <3765D223.BF16B905@mail.uca.edu>,
Cameron Dorey <camerond@mail.uca.edu> wrote:
> [cc'd to dc]
>
> David Cassell wrote:
> >
> > [courtesy cc to poster]
> >
> > Cameron Dorey wrote:
> > > [snip of mg's text]
> > >
> > > The code to all of the examples in the book is listed at Lincoln's
> > > website (actually Wiley's)
> > > http://www.wiley.com/compbooks/stein/source.html. I figure from this
> > > it's fair game to copy.
> >
> > Well, the OED is on-line if you know where to go, but I'm pretty
> > sure that has a copyright or trademark or *something*. :-)
> >
> > I'm not too comfortable with the inference:
> > readable -> free-to-copy-at-will
> >
> > But perhaps I'm just a stick in the mud.
>
> I guess I should have been more complete in my reasoning. If you read
> Lincoln's web page cited above, you come to the sentence:
>
> "There are no restrictions on your use of this source code. Feel free to
> redistribute it, modify it for your own purposes, or incorporate it into
> your own projects. Have fun!"
>
> Cameron
>
> --
> Cameron Dorey
> Associate Professor of Chemistry
> University of Central Arkansas
> Phone: 501-450-5938
> camerond@mail.uca.edu
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 15 Jun 1999 20:39:15 GMT
From: John Siracusa <macintsh@cs.bu.edu>
Subject: Re: Fix this uglyness
Message-Id: <7k6dlj$n9k$1@news1.bu.edu>
Alan <alanp@unixpower.org> wrote:
> I haven't the time to do it myself, so could someone please fix the systeming
> I used when I got tired:
> system("cat /var/log/wtmp | uuencode wtmp.`date +%m-%d` | mail $WTMPBACK");
> system("mkdir /var/wtmp 2> /dev/null");
> system("mv /var/log/wtmp /var/wtmp/wtmp.`date +%m-%d`");
> system("touch /var/log/wtmp");
Sure, no problem:
#!/bin/sh
cat /var/log/wtmp | uuencode wtmp.`date +%m-%d` | mail $WTMPBACK
mkdir /var/wtmp 2> /dev/null
mv /var/log/wtmp /var/wtmp/wtmp.`date +%m-%d`
touch /var/log/wtmp
Enjoy.
-----------------+----------------------------------------
John Siracusa | If you only have a hammer, you tend to
macintsh@bu.edu | see every problem as a nail. -- Maslow
------------------------------
Date: 15 Jun 1999 14:52:53 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Fix this uglyness
Message-Id: <3766bd25@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
John Siracusa <macintsh@cs.bu.edu> writes:
:cat /var/log/wtmp | uuencode wtmp.`date +%m-%d` | mail $WTMPBACK
^^^^^^^^^^^^^^^^^^^
Huh?
--tom
--
Emacs is a fine programming language, but I still prefer perl. -me
------------------------------
Date: 15 Jun 1999 20:54:57 GMT
From: John Siracusa <macintsh@cs.bu.edu>
Subject: Re: Fix this uglyness
Message-Id: <7k6ej1$nse$1@news1.bu.edu>
Tom Christiansen <tchrist@mox.perl.com> wrote:
> :cat /var/log/wtmp | uuencode wtmp.`date +%m-%d` | mail $WTMPBACK
> ^^^^^^^^^^^^^^^^^^^
> Huh?
Heh, yeah there are, er, "other problems" as well ;)
-----------------+----------------------------------------
John Siracusa | If you only have a hammer, you tend to
macintsh@bu.edu | see every problem as a nail. -- Maslow
------------------------------
Date: Tue, 15 Jun 1999 21:28:17 +0200
From: "Dav" <silver98@lycosmail.com>
Subject: Help needed !!!!!!!
Message-Id: <7k69je$d3g$1@urano.inet.it>
Hi,
I have got a home page on VirtualAve.
Now, my perl script doesn't work.
I always get the error:
Internal Server Error (500)
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, webmaster@virtualave.net and inform
them of the time the error occurred, and anything you might have done that
may have caused the error.
the simple script I'm using as a test is:
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "<html><head><title>Form Output</title></head><body>";
print "<h2>Results from FORM post</h2>\n";
print "</body></html>";
I put the script into the right directory and did all I had to do but
nothing ...
Who can help ?
Thanks !
Bye, Dav
------------------------------
Date: Tue, 15 Jun 1999 20:37:07 GMT
From: dalehend@flash.net
Subject: Re: Help needed !!!!!!!
Message-Id: <3766b95a.19792590@news.flash.net>
You have to check to make sure permissions are right for the file and
the directory its in. 755 for file and I think its 777 for directory.
On Tue, 15 Jun 1999 21:28:17 +0200, "Dav" <silver98@lycosmail.com>
wrote:
>Hi,
>
>I have got a home page on VirtualAve.
>Now, my perl script doesn't work.
>
>I always get the error:
>
>Internal Server Error (500)
>The server encountered an internal error or misconfiguration and was unable
>to complete your request.
>Please contact the server administrator, webmaster@virtualave.net and inform
>them of the time the error occurred, and anything you might have done that
>may have caused the error.
>
>the simple script I'm using as a test is:
>
>
>#!/usr/bin/perl
>
>print "Content-type:text/html\n\n";
>
>print "<html><head><title>Form Output</title></head><body>";
>print "<h2>Results from FORM post</h2>\n";
>
>print "</body></html>";
>
>
>
>I put the script into the right directory and did all I had to do but
>nothing ...
>
>Who can help ?
>
>Thanks !
>
>Bye, Dav
>
>
>
------------------------------
Date: Tue, 15 Jun 1999 16:56:34 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Help needed !!!!!!!
Message-Id: <brian-ya02408000R1506991656340001@news.panix.com>
In article <7k69je$d3g$1@urano.inet.it>, "Dav" <silver98@lycosmail.com> posted:
> #!/usr/bin/perl
>
> print "Content-type:text/html\n\n";
^
|
space?
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Tue, 15 Jun 1999 20:28:56 GMT
From: cmfinlay@magnet.com.au
Subject: How do I pass variables from the command line please?
Message-Id: <3766b48b.2990262@news.optusnet.com.au>
How do I pass variables from the command line please?
I already know how to pass variables to and from a subroutine.
I am using active perl for Win32 latest version.
I can also use linix perl if need be.
my email is cmfinlay@magnet.com.au
Thank you for your time in reading this.
------------------------------
Date: 15 Jun 1999 14:37:41 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How do I pass variables from the command line please?
Message-Id: <3766b995@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, cmfinlay@magnet.com.au writes:
:How do I pass variables from the command line please?
The answer is @ARGV, documented in the standard perlvar manpage
that ships with every distribution of Perl and is thus on your
very own system.
I suggest that you examine examples. Here are my favorite
places to send people looking for examples of Perl code.
ftp://ftp.oreilly.com/published/oreilly/perl/cookbook/
http://language.perl.com/ppt/
http://www.perl.com/CPAN-local/authors/id/TOMC/scripts/
--tom
--
"The social dynamics of the net are a direct consequence of the fact
that nobody has yet developed a Remote Strangulation Protocol."
--Larry Wall
------------------------------
Date: 15 Jun 1999 20:41:42 GMT
From: jfosler@button.seas.upenn.edu (Jessica Fosler)
Subject: Re: How do I pass variables from the command line please?
Message-Id: <7k6dq6$c22$1@netnews.upenn.edu>
There is an array called @ARGV. If you want the first argument, you can
access $ARGV[0].
This works in Win32 as well as all Unix/Linux versions.
--foo.pl--
#!perl
$, = ","; # set the output separator to a comma (not relevant)
print "[", @ARGV, "]\n"; # print out everything in the ARGV array
--
c:\temp> perl foo.pl fribble baz bar
[,fribble,baz,bar,]
- Jessica
cmfinlay@magnet.com.au wrote:
: How do I pass variables from the command line please?
: I already know how to pass variables to and from a subroutine.
: I am using active perl for Win32 latest version.
: I can also use linix perl if need be.
: my email is cmfinlay@magnet.com.au
: Thank you for your time in reading this.
------------------------------
Date: 15 Jun 1999 14:50:02 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How do I pass variables from the command line please?
Message-Id: <3766bc7a@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, cmfinlay@magnet.com.au writes:
:How do I pass variables from the command line please?
I just realized that you might be looking for a different
answer. I answered from the point of view of the program,
not that of the shell. For the other answer: 1) find a command
line 2) type a program name 3) follow it by its arguments 4) press the
<ENTER> key.
--tom
--
"If you're not having fun, you're doing something wrong."
------------------------------
Date: Tue, 15 Jun 1999 07:25:55 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How do I trim a string?
Message-Id: <38d5k7.35e.ln@magna.metronet.com>
Simon Kerr (skerr@ryder.co.uk) wrote:
: Hi, I'm trying to trim a string that contains both alphabetic and numeric
: chars. For example, "Call Detail For 012542916".
: I want to remove all of the alphabetic (i.e. [a-zA-Z]) characters, so that
: I'm just left with the numberic string ("012542916").
After removing all of the alphabetic characters, you would
be left with
' 012542916'
not
'012542916'
So I am not sure which you really want...
tr/a-zA-Z//d; # remove alphabetic characters
tr/a-zA-Z //d; # remove alphabetic and space characters
tr/0-9//cd; # remove non-digit characters
s/.*?(\d+)$/$1/; # remove all but digits at end of string
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 15 Jun 1999 16:09:47 -0400
From: "Dariush_news" <dazimi@yahoo.com>
Subject: How to scan a directory and put all the files and their size to a text file
Message-Id: <7k6c2q$c1r$1@clio.net.metrotor.on.ca>
Hi Everyone;
I need to scan a directory and input all the file namse in to a text file
with thier respecitve size.
Eventually I need to input this file into a excel programm and manipulate
it.
Does anybody have a similar script out there?
Thanks so much for your help.
Send emails to Teamlinux@hotmail.com
or Dariush_Azimi@mta1.metrodesk.metrotor.on.ca
------------------------------
Date: 15 Jun 1999 20:28:18 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: How to scan a directory and put all the files and their size to a text file
Message-Id: <7k6d12$645$2@info2.uah.edu>
In article <7k6c2q$c1r$1@clio.net.metrotor.on.ca>,
"Dariush_news" <dazimi@yahoo.com> writes:
: I need to scan a directory and input all the file namse in to a text file
: with thier respecitve size.
Maybe it would help if you showed us what you've tried so far.
Greg
--
Cop: I can put you in Queens on the night of the hijacking.
Hockney: Really? I live in Queens. Did you put that together yourself?
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 6005
**************************************