[7316] in Perl-Users-Digest
Perl-Users Digest, Issue: 941 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 28 17:07:14 1997
Date: Thu, 28 Aug 97 14:00:44 -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, 28 Aug 1997 Volume: 8 Number: 941
Today's topics:
Re: 'abandon' hope (was: Re: Need help: how to exit a s (William R. Somsky)
2-dim arrays help please! <rburditt@no.spam.please.fedex.com>
Re: 2-dim arrays help please! (Greg Bacon)
Re: Assinging values of HASH in to Array <billw@airone.claircom.com>
Re: Bizarre result with regex in -i -pe (Colin Kuskie)
Re: Bug in perl? Bug in my code? <tom@mitra.phys.uit.no>
Re: calling C program within perl CGI script <spence@ncsu.edu>
Re: Can *anyone* explain details of socket autoflush??? (Andrew M. Langmead)
checing for clean compile <peted@infi.net>
Re: Chomp and chop (Faust Gertz)
dbm <may@livingston.com>
Re: Easy Question: Dont Care. <fawcett@nynexst.com.spam-me-not>
Re: Filtering CR & CRLF from text input (Bart Lateur)
Re: Filtering CR & CRLF from text input (Faust Gertz)
Re: FTP with perl <selden@NOSPAM.instinet.com>
Getting next byte of scalar <dennis.kowalski@daytonoh.ncr.com>
Re: Integers, God, and e (was Re: Bug in perl? Bug in m <tom@mitra.phys.uit.no>
my scoping, 5.002 vs 5.004 (Colin Kuskie)
Re: Need CPAM mirror site URL (Colin Kuskie)
Re: Perl & Shadow Passwords authentitacion. <osborne6@acm.NOSPM.cps.msu.edu>
PERL/HTML Question <Rameet_Kohli@ccm.sc.intel.com>
Perl/Oraperl smeyyappan@pyrasol.com
returning from a subflow from a subflow <wxguest1@wv.MENTORG.COM>
Re: Scrambling using tr (Terry Michael Fletcher - PCD ~)
Re: Setting the TZ time variable within Perl <zenin@best.com>
Re: Some Assistance Please... <tom@mitra.phys.uit.no>
Use of Backslash in PERL on NT (Phil Marcille )
Re: Where is the FAQ? Not at "www.perl.com"! <jkv@a.sol.no>
Re: Wrong status from system() in child process ? <rjm2@cornell.edu>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 28 Aug 1997 18:45:56 GMT
From: somsky@dirac.phys.washington.edu (William R. Somsky)
Subject: Re: 'abandon' hope (was: Re: Need help: how to exit a sub)
Message-Id: <5u4h14$ks8@nntp6.u.washington.edu>
In article <Pine.GSO.3.96.970827073556.1757G-100000@julie.teleport.com>,
Tom Phoenix <rootbeer@teleport.com> wrote:
> On 27 Aug 1997, Damian Conway wrote:
>
> > You can get pretty close with:
> >
> > open(FILE, $file) or
> > return !warn "couldn't open $file: $!\n";
>
> Not bad, but I'd probably use this.
>
> open FILE, $file or
> (warn "couldn't open file '$file': $!" and return);
>
> No, really, I'd use an unless statement in this case. No point in
> confusing my maintenance programmer any further. Especially since I
> usually have to be my own maintenance programmer. :-)
Hmm... I've done something like this before, something along the lines of:
sub error { print stderr @_ ; undef }
open FILE, $file
or return error "Can't open $file: $!" ;
Now, I'm not claiming that this is the best way, or even a good way
to do this -- just that I wrote it and liked it at one time...
________________________________________________________________________
Dr. William R. Somsky somsky@phys.washington.edu
Department of Physics, Box 351560 B432 Physics-Astro Bldg
Univ. of Washington, Seattle WA 98195-1560 206/616-2954
------------------------------
Date: Thu, 28 Aug 1997 13:34:47 -0500
From: robert burditt <rburditt@no.spam.please.fedex.com>
Subject: 2-dim arrays help please!
Message-Id: <3405C4C7.6D51@no.spam.please.fedex.com>
I have spent much time reading some perl books trying to figure out
how to create, fill, and access a 2-dim array. i am aware that
perl doesn't directly support them, but i've also read that you
can use arrays of references that will do basically the same thing.
unfortunatly, i haven't been able to find an example of what i'm
trying to do.
I am reading several columns and rows out of a database.
once i select my data, i have to perform several calculations
on the data and then i would like to store it in a 2 dim array.
for each row of data i select, i must perform several calcs.
$var1[$index] = a random calc
$var2[$index] = a random calc
$var3[$index] = a random calc
i have a loop that performs all of the calculations once for each
row of data.
once i have all of my calculations done(and there are lots and lots of
them) i want to print them out in an html table.
i'd like to eventually have a 2 dim array with all of
my calcs so that i can print them out something like this:
print "$results[$row][$index]"; etc, etc...
my feeling is that i could keep all of the variables and
do an explicit assignment such as $results[$row] = \$var1
or something like that, but i want to be able to eliminate
all of those variables and the extra steps to make the assignment.
can anyone out there help me out in the proper way/syntax to
accomplish this type of thing?
thanks a lot in advance for your help!
robert
rburditt@no.spam.please.fedex.com --remove no.spam.etc.
------------------------------
Date: 28 Aug 1997 20:44:55 GMT
From: gbacon@adtran.com (Greg Bacon)
To: robert burditt <rburditt@no.spam.please.fedex.com>
Subject: Re: 2-dim arrays help please!
Message-Id: <5u4o07$dh3$1@info.uah.edu>
[Posted and mailed]
In article <3405C4C7.6D51@no.spam.please.fedex.com>,
robert burditt <rburditt@no.spam.please.fedex.com> writes:
: I have spent much time reading some perl books trying to figure out
: how to create, fill, and access a 2-dim array. i am aware that
: perl doesn't directly support them, but i've also read that you
: can use arrays of references that will do basically the same thing.
: unfortunatly, i haven't been able to find an example of what i'm
: trying to do.
Look no more! There are plenty of examples in the perllol(1) and
perldsc(1) manpages. :-)
Hope this helps,
Greg
--
Add `I-AM-A-WEENIE-I-MUNGE-FROM-HEADERS-AND-BREAK-WHAT'S-ALWAYS-WORKED'
to my address to reply. :-)
------------------------------
Date: Thu, 28 Aug 1997 12:24:19 -0700
From: William Warner <billw@airone.claircom.com>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Assinging values of HASH in to Array
Message-Id: <3405D063.1B1@airone.claircom.com>
Gotta tell someone this. The useful link was broken at the two CPAN
sites I tried.
ftp://ftp.spu.edu/pub/plan/perl/CPAN/doc/FAQs/FAQ/lib/DB_File.html
ftp://ftp.digital.com/pub/plan/perl/CPAN/doc/FAQs/FAQ/lib/DB_File.html
http://www.perl.com/CPAN-local/doc/FAQs/ext/DB_File/In_Memory_Databases.html
Tom Phoenix wrote:
>
> On Wed, 27 Aug 1997, William Warner wrote:
>
> > By the way, is there a module that would allow the application to
> > determine the order of keys in a hash?
>
> http://www.perl.com/CPAN/doc/FAQs/FAQ/html/perlfaq4/
> How_can_I_always_kep_my_hash_so.html
ww
------------------------------
Date: 28 Aug 1997 11:21:18 -0700
From: colink@latticesemi.com (Colin Kuskie)
Subject: Re: Bizarre result with regex in -i -pe
Message-Id: <5u4fiu$fra@sarek.latticesemi.com>
In article <5u467s$241$6@info.uah.edu>, Greg Bacon <gbacon@adtran.com> wrote:
>[Posted and mailed]
>
>In article <5u448r$lli$1@gte2.gte.net>,
> jdf@pobox.com (Jonathan Feinberg) writes:
>: I do a lot of one liners in my data-massaging efforts. I have a
>: tab-delimited file, in which some lines had data in the last field
>: of each line that I wanted to remove:
>:
>: perl -i.bak -pe 's/[^\t]+$//'
>:
>: Yes? No. This results in all of the newlines being stripped
>
>I think you mean
> % perl -pi.bak -e 's/\t+$//'
Nope, Jonathan wants to remove the last field of data from each line of his
file, but leave the newline intact. This should work better:
perl -pi.bak -e 's#[^\t]+$#\n#;'
(pause for brief command line test)
And of course, it always helps to remove the last tab along with the last
field :)
perl -pi.bak -e 's#\t[^\t]+$#\n#;'
Hope this helps,
Colin
------------------------------
Date: 28 Aug 1997 22:33:19 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: Bug in perl? Bug in my code?
Message-Id: <nqoyb5mvyi8.fsf@mitra.phys.uit.no>
Mark Buckaway <mark@uunet.ca> writes:
[rounding problem deleted to increase originality of content]
> Thoughts?
Yes.
Perform all your calculation in cents, and make sure they're integers
whenever entering your calculation and after any division.
Convert to dollars only upon output.
(Of course, if your figures overflow in cents, go for Gregg's
solution)
> Mark Buckaway mark@uunet.ca +1 888 UUNET OK
> Software Programmer Systems Group +1 416 216 5146
*Software* Programmer? How many different kinds are there?
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Thu, 28 Aug 1997 15:54:34 -0400
From: Spence <spence@ncsu.edu>
Subject: Re: calling C program within perl CGI script
Message-Id: <3405D77A.6BD8@ncsu.edu>
Mark Grimshaw wrote:
>
> Dear all,
>
> I'm having problems reading data returned by a C program that is called
> within my perl CGI script.
...
I was running into the same problem. Then I checked to see whether the
permissions had been setup properly. It wasn't. While it was executable
to root, that's not what my server runs as <big grin> (Doh! I haven't
done that one in a while). Making the script executable to all fixed the
problem...double check the obvious...
-Spence
-------------------------------------------
Press to test. <Click> Release to detonate.
-------------------------------------------
Web Programmer/Applications Developer
Technical Administration/Graphic Artist
NCState University - Computing Services
-------------------------------------------
http://www.ncsu.edu/spence
-------------------------------------------
------------------------------
Date: Mon, 25 Aug 1997 18:57:03 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Can *anyone* explain details of socket autoflush???
Message-Id: <EFHGn4.GHA@world.std.com>
nobody@REPLAY.COM (Anonymous) writes:
>The camel book says that setting $| to non-zero will
>force an fflush(3) after every write or print on
>_the_currently_selected_output_channel_.
>What the heck does that mean, the last stream I wrote
>to? Is there some other way to select an output
>channel?
It means that when you assign to $|, perl checks the currently
selected output filehandle (which defaults to STDOUT, and can be
changed by the single argument select() function.) It sets or clears
an "autoflush" flag for that filehandle based on the value assigned to
it. When a filehandle is written to, buffering happens depending on
each individual filehandles "autoflush" flag.
which means, after you open CLOUT, say:
my $old_filehandle = select CLOUT; # make CLOUT the default filehandle
$| = 1; # set CLOUT to command buffering
select($old_filehandle); # restore the previous default filehandle
or
use FileHandle;
CLOUT->autoflush(1); # set CLOUT to command buffering
to flush CLOUT after each print,printf, or write function call.
--
Andrew Langmead
------------------------------
Date: Thu, 28 Aug 1997 15:40:13 -0400
From: Pete Desnoyers <peted@infi.net>
Subject: checing for clean compile
Message-Id: <3405D41D.41C6@infi.net>
When I run this from the command line it works fine. I recieve the
appropriate messges:
/usr/local/bin/perl -wcMdiagnostics file.pl > compile.dat 2>&1
However, if I run this:
my $test = system("/usr/local/bin/perl -wcMdiagnostics file.pl >
compile.dat 2>&1");
via the WEB(CGI), I get this:
couldn't find diagnostic data in /usr/local/lib/perl5/pod/perldiag.pod
/usr/local/lib/perl5/alpha-dec_osf/5.002 /usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/alpha-dec_osf
/usr/local/lib/perl5/site_perl .
file.pl at
/usr/local/lib/perl5/diagnostics.pm line 225, chunk
507.
BEGIN failed--compilation aborted, chunk 507.
--
>>>>>> Pete <<<<<<
http://jerry.engrs.infi.net
------------------------------
Date: Thu, 28 Aug 1997 18:53:32 GMT
From: faust@wwa.com (Faust Gertz)
Subject: Re: Chomp and chop
Message-Id: <3406be27.2041013@news.wwa.com>
In article <Pine.SV4.3.94.970815161335.22551A-100000@aludra.usc.edu>,
Nadim <nrana@aludra.usc.edu> wrote:
>Could anyone let me know the difference between chomp and chop?
You mean besides the letter 'm'? :-) I ain't no expert, but I'll give
it a try. *chop* and *chomp* are usually used to remove the newline
character from the end of a string and are probably almost always more
efficient than s/\n$//. *chop* removes (and returns) the last
character of the string passed to it. *chomp* removes the record
separator, the value of $/, and returns the number of characters
removed. It is my feeling that *chomp* is probably better to use than
*chop* for removing newline characters as it will only chop off the
last character(s) if equal to the value of $/ and thus takes care of
some cross-platform issues (on Windows it will remove both the return
character and the newline character instead of just lobbing off the
last character).
> I am trying to use chomp in my script but it is not getting compiled.
> Why?
I dunno.
Streben nach Wahrheit
Faust Gertz
Philosopher at Large
"Diego used to be a guard at the Museum of Modern Art. He was on the
night shift. His job was to go around the museum and tell people to
leave. Or, as he put it, 'Snap them out of their art trances.'
People who'd been standing in front of one thing for hours, he would
jump in front of them and snap his fingers, and he'd say, 'Time to
go.'" -- Laurie Anderson, 'Time To Go (for Diego)'
------------------------------
Date: Thu, 28 Aug 1997 12:59:28 +0100
From: May Huang <may@livingston.com>
Subject: dbm
Message-Id: <3405681F.9EE90DB7@livingston.com>
This might well be a stupid question...
I have encountered a problem when saving large chunk of data into
dbm files. dbm has a size limitation of 1k per entry, is there any way
to get around this?
thanks.
--may
------------------------------
Date: 28 Aug 1997 14:11:20 -0400
From: Tom Fawcett <fawcett@nynexst.com.spam-me-not>
Subject: Re: Easy Question: Dont Care.
Message-Id: <8jk9h65gaf.fsf@nynexst.com.spam-me-not>
"Robert Friberg" <robert.friberg@eductus-vast.com> writes:
> the Thief of Always <omard@blue.seas.upenn.edu> skrev i inldgg
> <5tqts1$ole$1@netnews.upenn.edu>...
> >
> > whats the dont care variable as in.
> >
> > ($wanted, ______I DONT GIVE A SHIT ___) = split (/&/,$_);
> >
> > ^^^^^^ This is what I'm looking for.
>
>
> If you want the first value as a scalar try:
> $wanted = split(/&/,$_);
Just to be clear, this doesn't work. Split in a scalar context returns the
number of fields. You'll have to say:
($wanted) = split(/&/,$_);
or
$wanted = (split(/&/,$_))[0];
Of course, splitting a line just to get the first element is wasteful.
-Tom
------------------------------
Date: Thu, 28 Aug 1997 19:35:28 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Filtering CR & CRLF from text input
Message-Id: <3407d26b.15524002@news.tornado.be>
"Carey Barnett" <cbarnett@idirect.com> wrote:
>I'm new to Perl, but isn't this the 'chomp()' function EXACTLY!
>> >Can anyone tell me how to strip CRLFs from text input fields? I'm
You didn't understand the question quite right. Chomp remove the CRLF
from the END of a line.
The problem was how to remove CRLF's from WITHIN a text field, with
multiline text, where the user used the return key to preformat his
text. The question was how to turn this back into one single line.
HTH,
Bart.
------------------------------
Date: Thu, 28 Aug 1997 20:45:36 GMT
From: faust@wwa.com (Faust Gertz)
Subject: Re: Filtering CR & CRLF from text input
Message-Id: <340be1c9.3786749@news.wwa.com>
On Thu, 28 Aug 1997 19:35:28 GMT, bart.mediamind@tornado.be (Bart
Lateur) wrote:
>"Carey Barnett" <cbarnett@idirect.com> wrote:
>
>>I'm new to Perl, but isn't this the 'chomp()' function EXACTLY!
>
>>> >Can anyone tell me how to strip CRLFs from text input fields? I'm
>
>You didn't understand the question quite right. Chomp remove the CRLF
>from the END of a line.
>
>The problem was how to remove CRLF's from WITHIN a text field, with
>multiline text, where the user used the return key to preformat his
>text. The question was how to turn this back into one single line.
I'm new to Perl too, but could something like either 's/\n//g'
or 's#$/##g' be what you seek? If not, someone please enlighten me
too.
Faust Gertz
Philosopher at Large
------------------------------
Date: Thu, 28 Aug 1997 16:10:01 -0400
From: Michael Shael O'Neill Selden <selden@NOSPAM.instinet.com>
Subject: Re: FTP with perl
Message-Id: <3405DB19.1B6A@NOSPAM.instinet.com>
Matt Weber wrote:
>
> Is there an easy perl script or module for FTPing something? It needs to be
> able to run on its own....log itslef in....transfer files and close the socket.
> The running on its own part will be done with crontabs. Any suggestions?
>
> M. Weber
> http://weberworld.com
> http://cow.dyn.ml.org/caboose/
Matt,
What you want is FTP.pm (a.k.a. Net::FTP), distributed as part
of the libnet module set (currently v1.0505), available on CPAN
(ftp.funet.fi for the master site). Be sure to also download and build
the Data::Dumper module as it is required by the libnet stuff; there
are additional requirements (e.g. IO.pm) if you are not running a
current perl version. Enjoy.
Michael.
--
Michael Shael O'Neill Selden, SA, DBA, JAPH, DAD
selden@instinet.com
Remove "NOSPAM." From Address To Return Mail
PGP Public Key Available Upon Request
------------------------------
Date: Thu, 28 Aug 1997 14:41:36 -0400
From: Dennis Kowalski <dennis.kowalski@daytonoh.ncr.com>
Subject: Getting next byte of scalar
Message-Id: <3405C660.1327@daytonoh.ncr.com>
I am porting a C program to Perl.
The program looks at each byte of an input record.
I am doing the following in Perl.
$byte = substr($buff,$indx,1);
$indx is incremented to get to the next byte.
The $buff scalar has some binary data fields in it.
Most of the time $byte is set to the right value but sometimes
it gets set to 1.
One of the values that does this is a hex ac in $buff.
There are probably others too.
If substr has a problem with certain hex values, is there another way
to extract a byte from a scalar when the byte may be any binary value
of hex 00 to hex ff ?
Thank You
------------------------------
Date: 28 Aug 1997 22:35:52 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: Integers, God, and e (was Re: Bug in perl? Bug in my code?)
Message-Id: <nqowwl6vydz.fsf@mitra.phys.uit.no>
jdf@pobox.com (Jonathan Feinberg) writes:
> Hmmm. If you can find some integers whose relationship results in
> the value of the electron's QED "rest-mass" constant n, please
> let us know. Perhaps there's a Physics::QED module on CPAN...
I'm no expert on QED, but please bear in mind that all numerical
constants are the result of the system of units you choose to employ.
Presumably, there exists a system of units where n is unity.
> Jonathan Feinberg jdf@pobox.com Sunny Manhattan, NY
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 28 Aug 1997 10:55:20 -0700
From: colink@latticesemi.com (Colin Kuskie)
Subject: my scoping, 5.002 vs 5.004
Message-Id: <5u4e28$fch@sarek.latticesemi.com>
Greetings everyone!
I wrote and released my first module last week, and now my inbox is full
of people complaining that it produces warnings using 5.004_anything.
Naturally, I assumed they were wrong, but after my sysadmin compiled
5.004_03 this morning, I have to say that something fishy is going on.
Here's a quick test script:
package A::Foo;
package A::Foo::Bar;
my $var = 12;
1;
package A::Foo::Baz;
my $var = 13;
1;
package A::Foo;
1;
package main;
my $var = 14;
print "Hello world\n";
Running this under 5.002 produces no warnings of any kind. However, 5.004_03
says:
"my" variable $var masks earlier declaration in same scope at try line 9.
Here's my quandry:
1)using use strict is a good thing
2)that says I need to use my
3)my causes different scoping than unmy'ed variables
I can also think of 3 or 4 different solutions to this problem, (the easiest is
not to declare different packages in the same file). But why doesn't package
define a new lexical scope?
Colin Kuskie
------------------------------
Date: 28 Aug 1997 11:12:45 -0700
From: colink@latticesemi.com (Colin Kuskie)
Subject: Re: Need CPAM mirror site URL
Message-Id: <5u4f2t$flu@sarek.latticesemi.com>
In article <3405924f.4836750@news.nac.net>,
Mick Ghazey <mick@DONTSMAM.ME> wrote:
>Can't connect to www.perl.com. Does anybody know a CPAN mirror site?
Never thought that not being connected to the web would be a benefit :)
If you've ever saved the Module list, you'll get a complete list of
CPAN sites, or try www.perl.org, the Perl Institute.
Africa
South Africa
ftp://ftp.is.co.za/programming/perl/CPAN/
Asia
Hong Kong
ftp://ftp.hkstar.com/pub/CPAN/
Japan
ftp://ftp.dti.ad.jp/pub/lang/CPAN/
ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/
ftp://ftp.lab.kdd.co.jp/lang/perl/CPAN/
South Korea
ftp://ftp.bora.net/pub/CPAN/
ftp://ftp.nuri.net/pub/CPAN/
Taiwan
ftp://dongpo.math.ncu.edu.tw/perl/CPAN/
ftp://ftp.wownet.net/pub2/PERL/
Thailand
ftp://ftp.riubon.ac.th/pub/mirrors/perl/CPAN/
Australasia
Australia
ftp://ftp.netinfo.com.au/pub/perl/CPAN/
New Zealand
ftp://ftp.tekotago.ac.nz/pub/perl/CPAN/
Central America
Costa Rica
ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/
Europe
Austria
ftp://ftp.tuwien.ac.at/pub/languages/perl/CPAN/
Belgium
ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/
Czech Republic
ftp://ftp.fi.muni.cz/pub/perl/
ftp://sunsite.mff.cuni.cz/Languages/Perl/CPAN/
Denmark
ftp://sunsite.auc.dk/pub/languages/perl/CPAN/
Estonia
ftp://ftp.ut.ee/pub/languages/perl/CPAN/
Finland
ftp://ftp.funet.fi/pub/languages/perl/CPAN/
France
ftp://ftp.lip6.fr/pub/perl/CPAN/
ftp://ftp.oleane.net/pub/mirrors/CPAN/
ftp://ftp.pasteur.fr/pub/computing/unix/perl/CPAN/
Germany
ftp://ftp.Germany.EU.net/pub/programming/perl/CPAN
ftp://ftp.gmd.de/packages/CPAN/
ftp://ftp.leo.org/pub/comp/programming/languages/script/perl/CPAN/
ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/
ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/
ftp://ftp.uni-erlangen.de/pub/source/Perl/CPAN/
ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/
Greece
ftp://ftp.ntua.gr/pub/lang/perl/
Hungary
ftp://ftp.kfki.hu/pub/packages/perl/CPAN/
Ireland
ftp://sunsite.compapp.dcu.ie/pub/perl/
Italy
ftp://cis.utovrm.it/CPAN/
Norway
ftp://ftp.uit.no/pub/languages/perl/cpan/
Poland
ftp://ftp.pk.edu.pl/pub/lang/perl/CPAN/
ftp://sunsite.icm.edu.pl/pub/CPAN/
Portugal
ftp://ftp.ci.uminho.pt/pub/lang/perl/
ftp://ftp.telepac.pt/pub/CPAN/
Romania
ftp://ftp.dntis.ro/pub/mirrors/perl-cpan/
ftp://ftp.dnttm.ro/pub/CPAN
Russia
ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/
Slovenia
ftp://ftp.arnes.si/software/perl/CPAN/
Spain
ftp://ftp.etse.urv.es/pub/mirror/perl/
ftp://ftp.rediris.es/mirror/CPAN/
Sweden
ftp://ftp.sunet.se/pub/lang/perl/CPAN/
Switzerland
ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
the Netherlands
ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
ftp://ftp.EU.net/packages/cpan/
UK
ftp://ftp.demon.co.uk/pub/mirrors/perl/CPAN/
ftp://ftp.flirble.org/pub/languages/perl/CPAN/
ftp://sunsite.doc.ic.ac.uk/packages/CPAN/
ftp://unix.hensa.ac.uk/mirrors/perl-CPAN/
North America
Canada
ftp://enterprise.ic.gc.ca/pub/perl/CPAN/
ftp://ftp.utilis.com/public/CPAN/
ftp://theory.uwinnipeg.ca/pub/CPAN/
USA
ftp://cpan.if.usp.br/pub/mirror/CPAN/
ftp://ftp.cdrom.com/pub/perl/CPAN/
ftp://ftp.cis.ufl.edu/pub/perl/CPAN/
ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
ftp://ftp.digital.com/pub/plan/perl/CPAN/
ftp://ftp.duke.edu/pub/perl/
ftp://ftp.epix.net/pub/languages/perl/
ftp://ftp.iguide.com/pub/mirrors/packages/perl/CPAN/
ftp://ftp.metronet.com/pub/perl/
ftp://ftp.orst.edu/pub/packages/CPAN/
ftp://ftp.ou.edu/mirrors/CPAN/
ftp://ftp.rge.com/pub/languages/perl/
ftp://ftp.sedl.org/pub/mirrors/CPAN/
ftp://ftp.spu.edu/pub/CPAN/
ftp://ftp.sterling.com/CPAN/
ftp://uiarchive.uiuc.edu/pub/lang/perl/CPAN/
South America
Brazil
ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/
Chile
ftp://sunsite.dcc.uchile.cl/pub/Lang/perl/CPAN/
------------------------------
Date: Thu, 28 Aug 1997 14:33:06 -0400
From: John Osborne <osborne6@acm.NOSPM.cps.msu.edu>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl & Shadow Passwords authentitacion.
Message-Id: <Pine.GSO.3.95.970828142318.29131A-100000@sparty.cps.msu.edu>
On Thu, 28 Aug 1997, Tom Phoenix wrote:
> On 28 Aug 1997, John Osborne wrote:
>
> > I've found that I can snag encrypted passwords from /etc/shadow using
> > repeated calls to getpwent. Give it a try, it might work on your system.
>
> If you can do that from an unprivileged process, that pretty much negates
> the usefulness of having shadow passwords, doesn't it? :-)
>
After I posted I did a few tests: It works under Solaris and SunOS.
It doesn't work under FreeBSD. And I ran the script as a non root
process. Perhaps Sun needs to fix Something That Is Broke(tm).
> But if you're meaning that you can get these from a root-privileged
> process, that's fine - but you shouldn't have to use _repeated_ calls to
> getpwent to do so. (Unless you're trying to step through the list of users
> on the system?) Either use getpwuid or getpwnam. Hope this helps!
>
> --
I suppose I read thru the post a little quick, I was thinking more of the
lines of getting the whole listing, and not just one user. Your
suggestion though, of using getpwuid or getpwnam is a better solution if
one entry is needed. :)
osborne6@NOSPAMacm.msu.edu
j O h N o S B o r N e
I should change my sig, shouldn't I?
------------------------------
Date: Thu, 28 Aug 1997 10:24:14 -0700
From: Rameet Kohli <Rameet_Kohli@ccm.sc.intel.com>
Subject: PERL/HTML Question
Message-Id: <3405B43E.5C0A@ccm.sc.intel.com>
How do I pass arguements from a hyperlink to a perl script?
Rameet
kohli@cs.ucdavis.edu
------------------------------
Date: Thu, 28 Aug 1997 13:41:08 -0600
From: smeyyappan@pyrasol.com
To: mike@stripme.fc.hp.com
Subject: Perl/Oraperl
Message-Id: <872793309.2357@dejanews.com>
Mike McNelly,
First of all, I tried to reply back to Mike McNelly at:
mike@stripme.fc.hp.com
but I think that address is no longer correct.
This is in response to your reply of my posting to comp.lang.perl.misc
(attached below). I
At the end of your reply, you indicated that I should use Perl 5.004
instead of 4.036. But, the real reason I am trying to install Perl is
so
that I can use Oraperl. The version of Oraperl I have now is 2.4,
which
I've been told only works on Perl 4.x. Can you direct me toward the
version of Oraperl that I can use with Perl 5.004.
Also, the main reason I am installing Perl is because I have updated
my
operating system from HP-UX 9.x to HP-UX 10.20. Is there any reason
why I
can't keep the same version of Perl and Oraperl I have now? (Perl
4.035
Oraperl 2.4).
Thanks alot,
Saradha
Subject: Re: Perl 4.036
From: Mike McNelly <mike@stripme.fc.hp.com>
Date: 1997/08/27
Message-Id: <3404B2BD.75DC@stripme.fc.hp.com>
Newsgroups: comp.lang.perl.misc,comp.sys.hp.hpux
[More Headers]
smeyyappan@pyrasol.com wrote:
>
> Hi,
> I am trying to load Perl 4.036 in HP B.10.20 9000/803
> I got a couple of warnings when I did a make.
>
> cc: "perl.h", line 1032: warning 533: Inconsistent type declaration
for
> function "time".
>
> cc: yylex(): warning 6062: Optdriver: Exceeding compiler resource
limits
> in yylex; some optimizations skipped. Use +Onolimit if override
desired.
>
> But it did install perl. Is it ok if we go head and use the perl or
do
I
> have to make any changes and try to install it again.
>
> Thanks.
> Saradha Meyyappan
>
The first warning has to do with the definition of type time_t.
Various
implementations of unix do it differently. On HP-UX, the compiler is
giving you a warning but the types are compatible anyway so there is
no real problem.
The second warning is just a memo to you that the optimizer has
exceeded
its preset limits of internal resources needed to do an optimization.
If you "really" want that optimization, recompile as it suggests.
Otherwise, the compiler just falls back to a lower level of
optimization
for that file and continues. The code it generates is still correct.
In most cases, you won't be able to tell the difference in generated
code quality anyway.
BTW, you could do yourself a favor and get a newer version of Perl
than 4.036. It's been obsoleted for a couple of years now. Perl 5.004
is out. It's compatible in all essentials and it has a lot more
functionality.
Speaking only for myself,
Mike McNelly
mike@stripme.fc.hp.com
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Thu, 28 Aug 1997 12:26:24 -0700
From: WX Guest account <wxguest1@wv.MENTORG.COM>
Subject: returning from a subflow from a subflow
Message-Id: <3405D0DF.5C29@wv.MENTORG.COM>
I have run into a problem that I can't put a finger on. I have several
small subroutines in an include file. Within the file, I often call one
subroutine from another. When I tried to return a value from a routine
called from another routine, a got an error. I can't find any
documented reason for this. Any ideas??
--
*********************************
Mike Oar
------------------------------
Date: 28 Aug 1997 18:31:20 GMT
From: tfletche@pcocd2.intel.com (Terry Michael Fletcher - PCD ~)
Subject: Re: Scrambling using tr
Message-Id: <5u4g5o$iiq$1@news.fm.intel.com>
Justin Masters - remove "Y" to reply (jmastYers@pcocd2.intel.com) so eloquently and verbosely pontificated:
>
> Stuart Cooper <stuartc@ind.tansu.com.au> writes:
>
> > Any ideas?
> >
> > Yeah- 1) get your organisation to stop (pro|per)secuting Randal Schwartz.
> > 2) ask the Intel guy who prosecuted Randal; he's a *real* expert.
> > He unlearned Perl in 40 days!
>
> I'm trying to decide how to respond here.
>
> Let's start with this:
> [list of very intelligent points omitted]
ditto all that. very few people that i work with here even know that
randal has a case against him from INTeL. it was something that happened
a few years ago in oregon, an entire (large) state away. as far as i
know, your (intended to be) personally insulting comments are wasted on an
engineer in california, and a newsgroup with well-educated readers that
surely realize that you are completely offbase with your comments, and you
most likely have lost any respect.
having said that, if justin still really wanted to do a-z -> Z-A, how
about a substitution:
s/([a-z])/chr(187-ord($1))/eg;
# which is slightly less than typing:
y/a-z/ZYXWVUTSRQPONMLKJIHGFEDCBA/;
#!/usr/local/bin/perl -w
print "J" ."u". # -- Terry Fletcher
"s" ."t". " A", "n" # tfletche@pcocd2.intel.com
. "o" ,""."". "the", "r ","P". # Views expressed....not
"e"."rl" ." Ha", "c",'' ."" ."". # INTeL's....yadda yadda
"" , "k". "e" ."r" ;# yadda....
------------------------------
Date: 28 Aug 1997 19:37:15 GMT
From: Zenin <zenin@best.com>
Subject: Re: Setting the TZ time variable within Perl
Message-Id: <5u4k1b$h9u$4@nntp2.ba.best.com>
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
> In article <34041B54.58074A28@absyss.fr>, Doug Seay <seay@absyss.fr> wrote:
> > Do you mean "modify the TZ of the server" or "modify my own TZ
> > variable"? As a rule, modifying the TZ of your server will be bad. For
> > modifying your own, just change it like any other environment variable.
> > The info is in the man pages.
>snip<
> I doubt it very much. Changine $ENV{TZ} will change the C environment
> of the kids, but not of the current process.
You're mistaken. Changing anything in %ENV changes your _current_
environment as well as exporting those changes to your children. As
such, simply resetting $ENV{TZ} should do it.
BTW, there is no "C" environment, but just simply environment. It's
a process/kernel issue, not a language issue.
--
-Zenin
zenin@best.com
------------------------------
Date: 28 Aug 1997 22:24:43 +0200
From: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: Some Assistance Please...
Message-Id: <nqozpq2vywk.fsf@mitra.phys.uit.no>
gbacon@adtran.com (Greg Bacon) writes:
> In article <nqod8myycsb.fsf@mitra.phys.uit.no>,
> Tom Grydeland <tom@mitra.phys.uit.no> writes:
> : perl -wle 'print qq(Any (properly) "paired" delimiters are ok)'
>
[MaintenanceSermon snipped]
Yes, of course. I'm just very preoccupied with precision, and
rootbeer's formulation was <the above comment> away from being
technically correct. So obviously, I felt it had to be added.
> Tom has obviously received "emergency" phone calls at 2am. :-)
Excuse a non-native English speaker. Exactly what do you mean here?
That I've come up with this at 2am? That I've been woken at 2am by
someone desperately trying to understand the above? Something else?
BTW, I wouldn't have believed the above worked if it wasn't presented
on the norwegian perl group no.perl, immediately followed-up by
another poster with something similar to:
"That can't possibly work, can it? Yes it *does*! God, I love Perl!"
> Greg
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: Thu, 28 Aug 1997 19:03:30 GMT
From: marcille@kodak.com (Phil Marcille )
Subject: Use of Backslash in PERL on NT
Message-Id: <5u4hts$ltr$1@kodak.rdcs.Kodak.COM>
Keywords: Backslash NT
We are starting to use PERL as our scripting language on NT and are
running into problems with the use of the \ character. In PERL this denotes
that the next character should be taken as a special character but in NT, it's
the directory seperator. We want to create a series of commands(actually calls
to an Oracle database) by setting them to a variable and then running them
with the system command.
ex. $command = "plus33 sys/passwd \@test.sql > " . $ENV{'LOGS'} .
$file_seperator . "install_roles.log";
system($command);
The $file_seperator varaible was set to "\\" and LOGS =
d:\ORACLE_BASE\admin\ORCL\logbook. We find that this works for the first
reference of the environmental variable or the $file_seprerator variable but
after successive references to them, the \\ is dropped and the directory
structure is taken as one long word.
------------------------------
Date: 28 Aug 1997 20:54:29 +0200
From: Jon Kvebaek <jkv@a.sol.no>
Subject: Re: Where is the FAQ? Not at "www.perl.com"!
Message-Id: <yqpo90xmm93u.fsf@hullet.a.sn.no>
John Desmond Curry <jdcurry@primenet.com> writes:
> Thursday, August 28, 1997
>
> Dear Perl gurus :
>
> I am a newbie, so please have patience! I have spent hours
> trying to find the Perl FAQ at the various places that previous
> messages on this newsgroup (comp.lang.perl.misc) have said that
> it is at, including "www.perl.com", but none of them exist. So,
> where is it?
Oh they do: http://www.perl.com/CPAN/doc/ works. You get sent from
www.perl.com to whatever location is (apparently) closest to you.
--
Jon Kvebaek <jkv@a.sol.no>
Ab Tahf vf Onq Arjf.
------------------------------
Date: Thu, 28 Aug 1997 15:21:12 -0400
From: "Richard J. Marisa" <rjm2@cornell.edu>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Wrong status from system() in child process ?
Message-Id: <Pine.OSF.3.96.970828150704.19509D-100000@cupid.cit.cornell.edu>
Here is some more information on my problem:
I'd like to get the return status from a program
executed via system()
However, system returns -1; $rc (as computed below) is 255.
$! contains "No child processes"
The command DOES execute properly (file is fetched via http)
What happened to my child process status?
My code:
use integer;
my @args = ("webget",
"-d",
"-nab=$archivedir/$jobid/$subdocnum",
$url);
$rc = system @args;
&os_errorlogger("Message: $!");
$rc = ($rc & 0xffff) >> 8;
&os_errorlogger("Job $jobid: webget returned $rc");
The following forms give the same result:
$rc = 0xffff &
system("webget -d -nab=$archivedir/$jobid/$subdocnum \"$url\"");
$rc >>= 8;
my $rc = 0xFFFF & system("webget -d \"$url\" > $file");
$rc >>= 8;
Richard Marisa, Special Projects: Electronic Publishing Initiatives
Office of Information Technology, Cornell University
110 Maple Avenue, Room 109, Ithaca, NY 14850
rjm2@cornell.edu (607) 255-7636
On Thu, 28 Aug 1997, Tom Phoenix wrote:
> On Thu, 28 Aug 1997, Richard J. Marisa wrote:
>
> > I'm having trouble getting the return status from a system()
> > call. It works fine if I create a test script, but in my
> > application $? is always -1 after the system call.
>
> Maybe that's the proper value. :-)
>
> > The only difference is that the application calls system from within a
> > child (forked) process. Is there anything strange about the status
> > returned to child processes?
>
> Every process except init is a child process. :-)
>
> Can you post a small piece of code which doesn't do what you expect? A
> dozen lines or so should be plenty. Thanks!
>
> --
> Tom Phoenix http://www.teleport.com/~rootbeer/
> rootbeer@teleport.com PGP Skribu al mi per Esperanto!
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
>
>
>
------------------------------
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 941
*************************************