[11913] in Perl-Users-Digest
Perl-Users Digest, Issue: 5513 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 29 00:07:24 1999
Date: Wed, 28 Apr 99 21:00:18 -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 Wed, 28 Apr 1999 Volume: 8 Number: 5513
Today's topics:
Re: Better implementation of the modulus function? <sugalskd@netserve.ous.edu>
Re: How do you find perldoc? (Tad McClellan)
Re: How to access entire command line? georgee1631@my-dejanews.com
Re: How to access entire command line? <ebohlman@netcom.com>
how to find SUID files? (Meling Mudin)
Re: Invalid Header ? (Bob Trieger)
Re: Invalid Header ? <t-armbruster@ti.com>
NEED HELP!: Installing Thomas Boutell's GD Library (Bryant Fong)
Re: Out of Memory during Installation. (Ilya Zakharevich)
Re: part of a variable (Tad McClellan)
Re: PERL & Y2K <wyzelli@yahoo.com>
Re: PERL & Y2K <ebohlman@netcom.com>
Re: Perl 5.005_03 & Threads: variable scope <sugalskd@netserve.ous.edu>
Problem with Perl on Windows... <robert-kuropkat@home.com>
Problems with PerlIS <jtelling@online.no>
Re: Quotes question?? (Tad McClellan)
Re: Simple one? (Larry Rosler)
Socket Buffering problem <swamib@netscape.com>
Re: strange problem with the month from a date!! <wyzelli@yahoo.com>
Re: TCP socket problem (Charles DeRykus)
test <hattons@cpkwebser5.ncr.disa.mil>
Re: What does this error message mean? (Tad McClellan)
Re: When uploading files how do I count the characters <nospam@nospam.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 29 Apr 1999 02:39:18 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: Better implementation of the modulus function?
Message-Id: <7g8gom$14n$1@news.NERO.NET>
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
: [A complimentary Cc of this posting was sent to Don Roby
: <droby@copyright.com>],
: who wrote in article <7g1pt9$ans$1@nnrp1.dejanews.com>:
:> If your number is larger than your system's maximum integer, you won't be
:> working purely with integers anyway. Perl automatically casts to float when
:> necessary.
: Not in this case. But I hope that % works better in 5.005_57.
If nothing else there's better 64-bit support in _57, though that doesn't
so much solve the problem as put it off another few dozen bits... :)
Dan
------------------------------
Date: Wed, 28 Apr 1999 16:38:36 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How do you find perldoc?
Message-Id: <ckr7g7.b21.ln@magna.metronet.com>
steve (losteven@yahoo.com) wrote:
: I'm trying to look for the perldoc,
It comes with the perl distribution.
If you have perl, you should have perldoc.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 29 Apr 1999 01:04:39 GMT
From: georgee1631@my-dejanews.com
Subject: Re: How to access entire command line?
Message-Id: <7g8b76$8gl$1@nnrp1.dejanews.com>
@ARGV only seems to store the arguments in a command line. I was using
Getoptions and I am wondering whether there is a way to access the enire
command line, including the options. Sorry for not being clear the first
time.
In article <x3yiuaiqdik.fsf@tigre.matrox.com>,
Ala Qumsieh <aqumsieh@matrox.com> wrote:
>
> georgee1631@my-dejanews.com writes:
>
> > Inside a perl script is there a system variable or something that I
> > can use to access the entire command line that invoked the script.
>
> Read what 'perlvar' has to say about @ARGV.
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 29 Apr 1999 02:25:43 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: How to access entire command line?
Message-Id: <ebohlmanFAxIqw.9yM@netcom.com>
georgee1631@my-dejanews.com wrote:
: @ARGV only seems to store the arguments in a command line. I was using
: Getoptions and I am wondering whether there is a way to access the enire
: command line, including the options. Sorry for not being clear the first
: time.
All GetOptions does is look at @ARGV and selectively move some stuff out
of it.
------------------------------
Date: 29 Apr 1999 03:44:34 GMT
From: mudin@expert.cc.purdue.edu (Meling Mudin)
Subject: how to find SUID files?
Message-Id: <7g8kj2$bv5$1@mozo.cc.purdue.edu>
Hi,
How to use stat with perl to find SUID files?
-mel
------------------------------
Date: Wed, 28 Apr 1999 22:42:26 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Invalid Header ?
Message-Id: <7g82bj$7bh$1@ash.prod.itd.earthlink.net>
"Tim Armbruster" <t-armbruster@ti.com> wrote:
>It's impossible to tell what your problem is without seeing code. Post some
>code, but trim it down to under 40 lines.
Not only did you not quote what you were replying to but you left off
the part apart him posting his code to the correct newsgroup and not
c.l.p.m
------------------------------
Date: Wed, 28 Apr 1999 21:18:46 -0500
From: "Tim Armbruster" <t-armbruster@ti.com>
Subject: Re: Invalid Header ?
Message-Id: <TnPV2.28$GU3.2166@dfw-service1.ext.raytheon.com>
Thorsten Latka specifically mentioned the error, which was a Perl coding
error (as well as CGI). She simple forgot to produce a proper header, which
could have been remedied had she posted code.
Eric the Read had already mentioned the proper newsgroup, if her question
had not been about Perl.
Re: Invalid Header? is pretty self-explanatory, I think, and you obviously
knew what I was replying to since you mentioned it in your post.
Lay off or Lighten up.
Bob Trieger wrote in message <7g82bj$7bh$1@ash.prod.itd.earthlink.net>...
>"Tim Armbruster" <t-armbruster@ti.com> wrote:
>>It's impossible to tell what your problem is without seeing code. Post
some
>>code, but trim it down to under 40 lines.
>
>
>Not only did you not quote what you were replying to but you left off
>the part apart him posting his code to the correct newsgroup and not
>c.l.p.m
>
------------------------------
Date: Wed, 28 Apr 1999 18:10:06 -0700
From: buttmunc@uclink4.berkeley.edu (Bryant Fong)
Subject: NEED HELP!: Installing Thomas Boutell's GD Library
Message-Id: <MPG.119151488cab5d3c989696@news.berkeley.edu>
OK I _know_ this is probably the most basic of questions, but I am having
problems installing the GD library onto either a Windows 98 or a Linux
system.
The situation for my Windows install attempt:
I'm using ActivePerl build 515. I ran the PPM and did "install GD", no
problem. The question is, how do I use it. I downloaded some interface,
filename was Win32_gd_v961016.zip. It says to copy some files into some
directories, so I do it. No go, I run test.pl to test it and it
complains about a newGif procedure in GD::Image not working, or
something. Trying to install the standard GD library was a complete
failure, using dmake and Borland C++, I have no idea how to do it. =P
OK, this is the situation trying to install it on Linux:
I don't have root access so I have to set it up without root access. I
do as the instructions say to change the path flags, but still it tries
to add files to the root-controlled perl5 dirs. I think it's trying to
add the man pages. So I change all the directory paths to just "." Now
I get some blib dirs, lib dirs, etc. I add all of these directories to
my "uses lib" at the top of my perl file, no go.. it finds the GD.pm but
gets no further.
OK, so I don't know what to do. If somebody would be kind enough to
provide me with clear installation instructions, that'd be very nice.
Thanks in advance,
-Bryant Fong
------------------------------
Date: 29 Apr 1999 03:45:19 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Out of Memory during Installation.
Message-Id: <7g8kkf$88c$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to scott
<scott.wachtler@cdc.com>],
who wrote in article <372779D9.30C2E105@cdc.com>:
> Out of memory during ridiculously large request at
> ../../lib/ExtUtils/xsubpp line 198.
> Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
I do not have 5.005_02 around, does the line 198 looks like
$junk = "" ;
$current = \$junk;
=> while (<TYPEMAP>) {
next if /^\s*#/;
my $line_no = $. + 1;
? Then the problem may be with
> stdchar='unsigned char', d_stdstdio=define, usevfork=false
^^^^^^^^^^^^^^^^^
(though I have no idea why). Try to undef it when Configuring. BTW,
are you sure that the headers for your gcc match the version of
Solaris you have?
If you can recompile with debugging, try to reproduce the command
> ../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp
> -noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs >xstmp.c
> && mv xstmp.c DynaLoader.c
in ./ext/Dynaloader directory, setting the breakpoint in Perl_croak(),
and report the backtrace.
Ilya
------------------------------
Date: Wed, 28 Apr 1999 16:53:19 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: part of a variable
Message-Id: <vfs7g7.b21.ln@magna.metronet.com>
Steve . (syarbrou@nospam.enteract.com) wrote:
: I have a variable called QUESTION72.
Not if you are doing Perl you don't.
Perl's variable names all start with funny punctuation characters...
Please post only Perl questions here. Find out what programming
language you are using and see if you can find a newsgroup
about it.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 29 Apr 1999 10:37:16 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: PERL & Y2K
Message-Id: <7hOV2.3$8W2.3892@vic.nntp.telstra.net>
><FLAME BAIT> but please don't bother :-)
>Or computing the remainder modulo 100, to accommodate those many
>programs that will (and *should*) print the year as two digits.
></FLAME BAIT>
>
>--
>(Just Another Larry) Rosler
>Hewlett-Packard Company
>http://www.hpl.hp.com/personal/Larry_Rosler/
>lr@hpl.hp.com
I see nothing wrong with printing the year as two digits... just don't try
to do relative calculations based on it!
:^)
Wyzelli
------------------------------
Date: Thu, 29 Apr 1999 02:40:33 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: PERL & Y2K
Message-Id: <ebohlmanFAxJFL.B4H@netcom.com>
David Cassell <cassell@mail.cor.epa.gov> wrote:
: But Perl code is not necessarily Y2K-compliant. Still, it's so
: easy to check that no one has bothered writing immense wads of
: code to do so. You just check to see if someone has used one of
: (gmtime, localtime) in the code. If so, you parse the code
: to find what the name of the $year variable is. Then you check to see
: if something stupid was done with $year, like appending 19 in front
: of it instead of adding 1900 to it.
Actually, it's possible to have non-compliant code that never gets the
system date. For example, code that gets dates with 2-digit years as some
sort of user input and sorts or compares them.
------------------------------
Date: 29 Apr 1999 02:52:13 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: Perl 5.005_03 & Threads: variable scope
Message-Id: <7g8hgt$14n$2@news.NERO.NET>
Weslee <nospam@shano.com> wrote:
: I've noticed a few interesting things about threads.
: Bugs?
: For a clearer defenition, I refer to the main program thread as the the one
: perl creates at startup, same as a single-threaded program.
[Snip]
: The main thread stays active for a while, eventually however it does end,
: and leaves the other threads running. About that time the other threads
: started flipping out.
I don't think perl currently handles the case where the main thread exits
but the child threads keep running. I bet that at least some global
cleanup gets triggered and all sorts of Evil Things(tm) start happening.
So Don't Do That! :)
There's a reason that threads are labelled experimental...
(Though it does beg the question--what should happen? Falling off the end
of the world's an implied exit, so should the main thread wait for the
children to finish, just kill the kids off entirely, or something else?
Interesting question. Now all we need is a good answer)
Dan
------------------------------
Date: Thu, 29 Apr 1999 02:07:49 GMT
From: "Robert Kuropkat" <robert-kuropkat@home.com>
Subject: Problem with Perl on Windows...
Message-Id: <eboregxhebcxngubzrpbz.fax9ea0.pminews@news>
I'm having some difficulty with Perl on Windows. I'm fairly certain it's a
setup problem, but I just don't have much windows experience, so I'm not sure
what's setup wrong, and/or what's simply not possible on the windows port.
I'm using the PerlMagic distribution from http://www.petes-place.com/ (not
ActiveState's ActivePerl). When I try a bit of code such as this:
sub Main;
Main;
use Date::Calc;
sub Main {
print "fred\n";
}
I get the following error:
Can't locate DynaLoader.pm in @INC (@INC contains: F:\PERL\lib .) at
F:\PERL\lib/Date/Calc.pm line 15.
BEGIN failed--compilation aborted at test.pl line 48.
Other tests gave a similar message about Autoloader.pm. My system does not
seem to have either DynaLoader.pm or Autoloader.pm, which, presumably is why
perl "Can't locate..." it.
I know there are some differences between Unix Perl and Win32 Perl. Is this
one of them? Do I have it setup incorrectly? Or am I just plain missing
something?
Admitadly, this adds to my reasons not to mess with windows, but that is what
the client is using (for now).
Any help appreciated...
Robert Kuropkat
------------------------------
Date: Thu, 29 Apr 1999 03:15:28 +0200
From: Thomas Ellingsen <jtelling@online.no>
Subject: Problems with PerlIS
Message-Id: <3727B2B0.D1187DEF@online.no>
hI,
when I install PerlIS in the same folder as Perl for win32 I always get
the same message, couldn't find perl.exe eventhough it's there. Does
anyone know what this means? And do you know if PerlIS works with
Personal Webserver by MS?
Thomas
------------------------------
Date: Wed, 28 Apr 1999 16:58:24 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Quotes question??
Message-Id: <gps7g7.b21.ln@magna.metronet.com>
steve (losteven@yahoo.com) wrote:
: If I print out $me, I will get:
: My,name,is,steve
How come there are 3 commas there when you had 4 in
your assignment?
: but if I want to get this:
: "My","name","is","steve"
: what do I need to do?? How do I modify
: $me = "$var1,$var2,$var3,$var4,$var5"??
$me =~ s/,/","/g;
$me = '"' . $me . '"';
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 28 Apr 1999 17:49:15 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Simple one?
Message-Id: <MPG.11914c62df2594f98996f@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <m3iuagti2x.fsf@joshua.panix.com> on 28 Apr 1999 19:56:38 -
0400, Jonathan Feinberg <jdf@pobox.com> says...
> Jonathan Feinberg <jdf@pobox.com> writes:
>
> > Looks like a bug. I have reported it using perlbug.
>
> Well, if you're going to make an ass out of yourself, make sure to do
> so as loudly as possible. Make sure to broadcast your ignorance to an
> audience best equipped to discern it and correct it.
>
> As many, many members of the p5p list have pointed out to me, it's a
> feature.
Lots of us noticed your goof, but not one of us chose to embarrass you
publicly. Some horrible crashes are best simply turned away from. :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 28 Apr 1999 19:17:37 -0700
From: Swaminathan Balasubramanian <swamib@netscape.com>
Subject: Socket Buffering problem
Message-Id: <3727C141.B42195E6@netscape.com>
Hi All,
I have a perl program which sends mail opening SMTP connection to mail
server. The receipients of the mail are taken from the seprate file and
for each receipients in the file, the message is sent.
Now, The letter content and Size of the letter seems to affect the speed
(throughput rate) of the Perl program. The strange thing is sometimes
even the bigger file gets sent faster than the smaller file. I am not
sure if there is anyway to faster the socket buffering regardless of the
size of the letter.
Can anyone please help me.
Thanks
Swami
------------------------------
Date: Thu, 29 Apr 1999 10:31:42 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: strange problem with the month from a date!!
Message-Id: <VbOV2.2$8W2.3725@vic.nntp.telstra.net>
pablocosta@iname.com wrote in message <7g7bs7$b3k$1@nnrp1.dejanews.com>...
>I have never programmed in perl.
>I have a perl program that splits the date:
>
>#!/usr/bin/perl
>($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
>print $mon;
Modify that to:
#!/usr/bin/perl -w
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);$mon++;
print $mon;
And you will get the correct month
Wyzelli
------------------------------
Date: Thu, 29 Apr 1999 00:27:23 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: TCP socket problem
Message-Id: <FAxD9n.6J5@news.boeing.com>
In article <7g76mq$673$1@nnrp1.dejanews.com>,
Aaron Shilts <ashilt01@sprintspectrum.com> wrote:
>
> ...
>
>Here is the subroutine that sends the contents of $line out the socket:
>
>---------------------------------------------
>sub send_calls {
> ....
> printf SOCKET ("$line\n");
> }
>
`perldoc perlfaq5' for details about buffering.
Something like this'll work:
select((select(SOCKET), $| = 1)[0]);
Also, you might be interested in this from the printf doc
(perldoc -f printf) :
Don't fall into the trap of using a printf() when a simple
print() would do. The print() is more efficient, and less
error prone.
hth,
--
Charles DeRykus
------------------------------
Date: Wed, 28 Apr 1999 16:47:47 -0400
From: "Steven T. Hatton" <hattons@cpkwebser5.ncr.disa.mil>
Subject: test
Message-Id: <372773F2.4EB668D3@cpkwebser5.ncr.disa.mil>
------------------------------
Date: Wed, 28 Apr 1999 16:42:28 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: What does this error message mean?
Message-Id: <krr7g7.b21.ln@magna.metronet.com>
Bart Lateur (bart.lateur@skynet.be) wrote:
: Actually, I would have preferred that "0" as a string would have been
: considered as TRUE, so ANY string that isn't the null string (length=0)
: is true.
: print chr(48)?'true':'false';
But then what number would perl DWIM a non-digit string into?
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 28 Apr 1999 18:29:17 -0700
From: "Matthew Austin" <nospam@nospam.com>
Subject: Re: When uploading files how do I count the characters in the resulting filename?
Message-Id: <7g8cjp$kpc$1@newswest.sybase.com>
thanks! it works great . . .
-SiriD
Craig R. Belcham wrote in message <3726ABEA.386392AD@highpoint.co.uk>...
Siri Dhyan Singh wrote:
>
> Wow that was tough for a header . . .
> I am using a html form to allow web clients to browse for a file and upload to a
> predefined directory.
>
> How do I count the characters in the resulting file name.
...
> while (/pattern/g){
> count++;
$count = length($filename);
Regards
Craig
--
Craig R. Belcham. Internet Systems Management Consultant.
Email: crb@highpoint.co.uk, http://www.highpoint.co.uk/~crb
"The greatest trick the devil ever pulled was convincing the
world that he didn't exist" -- Kevin Spacey, Usual Suspects.
------------------------------
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 5513
**************************************