[13210] in Perl-Users-Digest
Perl-Users Digest, Issue: 620 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 23 11:07:22 1999
Date: Mon, 23 Aug 1999 08:05:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 23 Aug 1999 Volume: 9 Number: 620
Today's topics:
array of objects (dererencing issue) <michel.combes@hl.siemens.de>
Re: Backtracking up through parent directories <flavell@mail.cern.ch>
Re: calling an executable from a perl script <jpeterson@office.colt.net>
directory processing <pandey@my-deja.com>
Error message ?! <chester@ma.ultranet.com>
Re: Error message ?! (Abigail)
fork() on the web. Missing the point here? <ralawrence@my-deja.com>
Re: fork() on the web. Missing the point here? <ralawrence@my-deja.com>
Re: GDBM Access in Perl <Tim.Potter@anu.edu.au>
Re: Help for the newbie <latsharj@my-deja.com>
Re: How to avoid "Repost from data?" question? (Abigail)
Image reading and browsing h.benne@library.uu.nl
Re: Image reading and browsing (Abigail)
Re: looking for perl script to upload a file <ahands@sprynet.com>
Re: looking for perl script to upload a file <cornel_p@my-deja.com>
modifying /etc/master.passwd (Marcel Lemmen)
Re: modifying /etc/master.passwd (Abigail)
path to Absolute paths? <jkekoni@cc.hut.fi>
Re: Perl Email With Netscape <jimmy@blackhole-designs.com>
Re: Perl Email With Netscape <jpeterson@office.colt.net>
Re: Perl Email With Netscape <flavell@mail.cern.ch>
Re: problem with some system calls and passing variable <jpeterson@office.colt.net>
Rebuild perl <mars@visbyte.com>
Re: Redex and Efficiency <bshow@my-deja.com>
Re: Redex and Efficiency <joeyandsherry@mindspring.com>
Re: Resolving, Capturing, Storing a file on the network <Jeff.T.Parker@compaq.com>
Re: Shell vs Perl <sariq@texas.net>
short question - short answer <andre.pletschette@ltam.lu>
Re: short question - short answer <jpeterson@office.colt.net>
socket timeout <wablief@freemail.nl>
Re: Sort Files by Date and then Name <vmurphy@gamora.ndhm.gtegsc.com>
Re: Sort Files by Date and then Name <gellyfish@gellyfish.com>
Re: Why use Perl when we've got Python?! <robin@jessikat.demon.co.uk>
Re: Why use Perl when we've got Python?! <flavell@mail.cern.ch>
Re: Why use Perl when we've got Python?! (Kaz Kylheku)
Re: Why use Perl when we've got Python?! (Graham Matthews)
Re: Why use Perl when we've got Python?! (Abigail)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 23 Aug 1999 15:40:19 +0200
From: Michel Combes <michel.combes@hl.siemens.de>
Subject: array of objects (dererencing issue)
Message-Id: <37C14F43.B1A3D1DD@hl.siemens.de>
Hi all,
I'm new in writing OO code, and want to have an Array of objet
but I can't find a easy wait to dereference it
Any suggestion is welcomed.
Here is the problem I'm facing...
$i = 3;
$v = Object->new();
$MEM[$i]=$v;
print $MEM[$i]->display();
I have the error :
Can't call method "display" without a package or object reference
Thanx,
Michel
--
Dr. COMBES, HL MD CPD, MchM, Michel.Combes@HL.Siemens.de
Phone: +49 89/234-83883, Fax: +49 89/234-83319
" Do not follow where the path may lead. Go instead
where there is no path and leave a trail. "
------------------------------
Date: Mon, 23 Aug 1999 13:12:28 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Backtracking up through parent directories
Message-Id: <Pine.HPP.3.95a.990823130452.22841F-100000@hpplus03.cern.ch>
On Mon, 23 Aug 1999, Michel Dalle wrote:
> Therefore, a . at the beginning of the file should be
> >illegal.
>
> Ouch. That's NOT true for Unix-type systems (and probably others too).
Indeed. Right now on my Win95 I am looking at files called .lynxrc ,
.RTPdefaults , and so on.
_Some_ Windows software is crabby about handling such file names, but
they are definitely create-able and use-able for the purposes that they
are being used for here.
> And ..whatever also seems to be a valid filename here.
yup, I've just created one of those in Win95, too.
all the best.
------------------------------
Date: Mon, 23 Aug 1999 12:31:18 GMT
From: Jon Peterson <jpeterson@office.colt.net>
Subject: Re: calling an executable from a perl script
Message-Id: <qabw3.239$u07.1768@news.colt.net>
poocus@my-deja.com wrote:
> if($name eq "auditid")
> {
> #Send the message to kill the audit
> $errormessage = system ("/cdvu/bin/CdvuSendMessage 3 $value");
> }
> The perl script that I have is invoked when a button on a web page is
> pressed, but it does not work, nothing happens.
> I have tried the code from the command line & it runs perfectly.
> The value returned by system() is 256.
Probably a permissions problem. When you invoke from the command line,
everything happens under the permissions of the userid you are logged in
as. When you run from teh web, everyting runs with the permissions of the
user the webserver runs as, often 'nobody' or some other priviledged account.
------------------------------
Date: Mon, 23 Aug 1999 14:21:57 GMT
From: Shardendu Pandey <pandey@my-deja.com>
Subject: directory processing
Message-Id: <7prldn$3db$1@nnrp1.deja.com>
Hello,
I am new to perl. I am writing a function
to process a directory. It reads a directory
and processes all the files in that directory
one by one by a certain rule.
What are the constructs to use for this
operation?
Best wishes
Pandey
--
==============================================
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 23 Aug 1999 07:35:35 -0400
From: Kevin D Chester <chester@ma.ultranet.com>
Subject: Error message ?!
Message-Id: <37C13206.D5948AEF@ma.ultranet.com>
Our server was just upgraded and is now running perl 5.00503. Our
shopping cart script was running just fine until this upgrade. At first
we were gettinga '500 server error' error message. We changed the perl
version in our script from perl5.003 to perl5.00503 and now get the
following error message: 'Invalid transmission #3 received from:
209.6.64.150'. All if the permissions for the directories/script/html
pages are 'drwxrwxrwx' & '-rwx r-xr-x'. Any clue in what might be
causing this error message?
Thanks for your help and insight!!!
Kevin
------------------------------
Date: 23 Aug 1999 09:09:00 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Error message ?!
Message-Id: <slrn7s2lhj.k6b.abigail@alexandra.delanet.com>
Kevin D Chester (chester@ma.ultranet.com) wrote on MMCLXXXIII September
MCMXCIII in <URL:news:37C13206.D5948AEF@ma.ultranet.com>:
`` Our server was just upgraded and is now running perl 5.00503. Our
`` shopping cart script was running just fine until this upgrade. At first
`` we were gettinga '500 server error' error message. We changed the perl
`` version in our script from perl5.003 to perl5.00503 and now get the
`` following error message: 'Invalid transmission #3 received from:
`` 209.6.64.150'. All if the permissions for the directories/script/html
`` pages are 'drwxrwxrwx' & '-rwx r-xr-x'. Any clue in what might be
`` causing this error message?
Did you grep for 'Invalid transmission' in the perldiag manpage?
Did you find any explaination? Because, if it's a Perl error, it
will be documented in the perldiag manpage; if it isn't a Perl
error, it won't be there.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 23 Aug 1999 13:08:20 GMT
From: Richard Lawrence <ralawrence@my-deja.com>
Subject: fork() on the web. Missing the point here?
Message-Id: <7prh3s$3t$1@nnrp1.deja.com>
Hello there!
I'm not sure if this really is a cgi or perl question. I'm assuming
that its actually a perl one since the code is in perl and my perl is
well known to be not the greatest in the land, however, if it is more
cgi related then I do apologise now before I get inundated with flames.
The code I have is as follows:
#!/usr/bin/perl -w
use strict;
my $pid;
if ($pid = fork())
{
print "Content-type: text/html\n\nCheck the /tmp dir!";
exit(1);
}
close (STDOUT);
open (FILE, "/tmp/here.txt") || die "can't! : $!";
print FILE "hello!";
close FILE;
What I want it to do is fork (which it does), write a message to the
browser (which it does) and write a file out (which it doesn't).
Eventually the open,print,close will be replaced by a much larger bit
of code which will, in the end, do the same (write out a file in the
account). But at the moment nothing gets written at all.
I've tried running the code through a c wrapper with:
void main(void)
{
execl("/usr/local/bin/perl", "test.pl",
"/home/rich/public_html/test.pl", NULL);
}
and set with mode 4755 but that didn't work either.
Can anyone give me any pointers?
Regards
Rich
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 23 Aug 1999 13:33:47 GMT
From: Richard Lawrence <ralawrence@my-deja.com>
Subject: Re: fork() on the web. Missing the point here?
Message-Id: <7prijr$13u$1@nnrp1.deja.com>
In article <7prh3s$3t$1@nnrp1.deja.com>,
Richard Lawrence <ralawrence@my-deja.com> wrote:
> The code I have is as follows:
>
> #!/usr/bin/perl -w
> use strict;
>
> my $pid;
>
> if ($pid = fork())
> {
> print "Content-type: text/html\n\nCheck the /tmp dir!";
> exit(1);
> }
> close (STDOUT);
>
> open (FILE, "/tmp/here.txt") || die "can't! : $!";
Ooops. This should have been
open (FILE, ">/tmp/here.txt") || die "can't! : $!";
and funnily enough it all works!
[slaps head about a bit and shuffles off embarrased]
Sorry :o)
Rich
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 23 Aug 1999 22:45:10 +1000
From: Tim Potter <Tim.Potter@anu.edu.au>
Subject: Re: GDBM Access in Perl
Message-Id: <6yogfyd5t5.fsf@anu.edu.au>
snowhare@long-lake.nihongo.org (Benjamin Franz) writes:
[...]
> >I fully admit I may just be doing the tie() wrong, but I can't verify as
> >there is zero documentation (from what I can find) on GDBM access in Perl.
>
> 'perldoc GDBM_File'
Or look in the texinfo file for gdbm. There's plenty of useful
documentation there.
Tim.
>
> --
> Benjamin Franz
>
--
Tim Potter, System Admin/Programmer "Disco Stu doesn't advertise"
Advanced Computational Systems CRC, RSISE Bldg Australian National University,
Canberra 0200, AUSTRALIA Ph: +61 2 62798813 Fax: +61 2 62798602
------------------------------
Date: Mon, 23 Aug 1999 13:21:00 GMT
From: Dick Latshaw <latsharj@my-deja.com>
Subject: Re: Help for the newbie
Message-Id: <7prhrg$ko$1@nnrp1.deja.com>
In article <7pqmt7$ncj$1@bgtnsc02.worldnet.att.net>,
"Tim Allen" <tallen@allentechconsult.com> wrote:
> Is there a tutorial somewhere that can show me how to manipulate an
> sql database with a perl program?
perldoc -q sql
--
Regards,
Dick
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 23 Aug 1999 08:57:59 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How to avoid "Repost from data?" question?
Message-Id: <slrn7s2kss.k6b.abigail@alexandra.delanet.com>
Andrei Karpatchev (karpat@eeh.ee.ethz.ch) wrote on MMCLXXXIII September
MCMXCIII in <URL:news:37C121B8.422B76DB@eeh.ee.ethz.ch>:
!! Salue, everybody!
!! If I have an on-fly document (result of some "form" with POST method),
!! which user leaves and then comes back with aid of the browsers button
!! "Back"... The browser asks then "Repost from data?". Is it possible
!! somehow to avoid this question, is there some special HTML-Tag or
!! something else?
1) That is not a Perl question.
2) That is not an HTML question either.
3) That is not a Perl question.
4) If you don't want your wowser to warn you, get a different wowser.
5) That is not a Perl question.
6) Don't even think of changing the behaviour of my wowser.
7) That is not a Perl question.
Did I mention that your question isn't a Perl question?
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 23 Aug 1999 15:47:08 GMT
From: h.benne@library.uu.nl
Subject: Image reading and browsing
Message-Id: <7prj82$mjp$2@news1.xs4all.nl>
Hello,
I'm looking for a PERL CGI-script to read all JPEG files in a certain
directory (on a http location) and then display them in thumbnail format.
There must be a possibility to zoom to the real picture, and from there,
browse forward and backward. It would be great if a header and footer can be
added and the number of columns can be adjusted.
Does anybody where I can find a Perl script which can do this?
Thanx,
Hugo (h.benne@library.uu.nl)
------------------------------
Date: 23 Aug 1999 09:10:41 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Image reading and browsing
Message-Id: <slrn7s2lko.k6b.abigail@alexandra.delanet.com>
h.benne@library.uu.nl (h.benne@library.uu.nl) wrote on MMCLXXXIII
September MCMXCIII in <URL:news:7prj82$mjp$2@news1.xs4all.nl>:
.. Hello,
..
.. I'm looking for a PERL CGI-script to read all JPEG files in a certain
.. directory (on a http location) and then display them in thumbnail format.
.. There must be a possibility to zoom to the real picture, and from there,
.. browse forward and backward. It would be great if a header and footer can be
.. added and the number of columns can be adjusted.
..
.. Does anybody where I can find a Perl script which can do this?
And a C program doing the same won't do because of?
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 23 Aug 1999 07:53:43 -0400
From: Adrian Hands <ahands@sprynet.com>
To: poocus@my-deja.com
Subject: Re: looking for perl script to upload a file
Message-Id: <37C13647.7B6C0482@sprynet.com>
poocus@my-deja.com wrote:
>
> I'm looking for a perl script that can be used for uploading a file?
> any suggestions as to where i might get one are welcomed.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
CPAN
"put" methods of:
Net::FTP
or
lib::LWP
E.g., using Net::FTP:
#!/usr/bin/perl -w
use strict;
use Net::FTP;
my $ftp = Net::FTP->new("some.host.name")
or die "Cannot connect: $@\n";
$ftp->login("anonymous", "me@here.there")
or die "login failed!\n";
$ftp->cwd("/pub") or die "cwd failed!\n";
$ftp->put("/etc/hosts", "that.file")
or die "put failed: $!\n";
$ftp->quit;
------------------------------
Date: Mon, 23 Aug 1999 11:51:04 GMT
From: Cornel Popescu <cornel_p@my-deja.com>
Subject: Re: looking for perl script to upload a file
Message-Id: <7prcj5$sr9$1@nnrp1.deja.com>
See CGI.pm, http://stein.cshl.org/WWW/software/CGI/
In article <7pr8oj$qfr$1@nnrp1.deja.com>,
poocus@my-deja.com wrote:
> I'm looking for a perl script that can be used for uploading a file?
> any suggestions as to where i might get one are welcomed.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 23 Aug 1999 12:54:48 GMT
From: lemmen@supportnet.nl (Marcel Lemmen)
Subject: modifying /etc/master.passwd
Message-Id: <8E2B99783marcelsoftware4ucomN@news2.supportnet.nl>
Hi,
I'm writing a program that has to write in /etc/master.passwd (NOT using
the web so it's pretty secure!).
What is the easyst way to modify a password for an user ???
Getting the password can be done using 'getpwent' etc.
Is there such function for wrinting the password????
Plz mail me back.
Kind regards,
Marcel Lemmen
------------------------------
Date: 23 Aug 1999 09:12:32 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: modifying /etc/master.passwd
Message-Id: <slrn7s2lo6.k6b.abigail@alexandra.delanet.com>
Marcel Lemmen (lemmen@supportnet.nl) wrote on MMCLXXXIII September
MCMXCIII in <URL:news:8E2B99783marcelsoftware4ucomN@news2.supportnet.nl>:
//
// I'm writing a program that has to write in /etc/master.passwd (NOT using
// the web so it's pretty secure!).
Oh, really? "It is not on the web, so it's pretty secure!". Hihihihihihi.
// What is the easyst way to modify a password for an user ???
The `passwd' command, that has been around for decades?
// Getting the password can be done using 'getpwent' etc.
// Is there such function for wrinting the password????
print
// Plz mail me back.
No.
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 23 Aug 1999 13:53:33 GMT
From: Joonas Timo Taavetti Kekoni <jkekoni@cc.hut.fi>
Subject: path to Absolute paths?
Message-Id: <7prjot$4j6h$1@midnight.cs.hut.fi>
Who can i do this in perl?
shell $ cd /usr/bin ; pwd
/1/usr/bin
shell $ cd ~jkekoni ; pwd
/1/home/jkekoni
if i just
glob "/usr/bin" i get "/usr/bin".
I know i can do it using the shell:
$t='cd $foo;pwd ';
--
_- Joonas Kekoni OH2MTF I -_
_-internet: jkekoni@cc.hut.fi I DO NOT EAT. -_
_-slowmail: j{mer{ntaival 7a176 I -_
_- 02150Espoo I It is a monitor -_
_- Finland/Europe I -_
------------------------------
Date: Mon, 23 Aug 1999 12:56:59 GMT
From: Jimmy Humphrey <jimmy@blackhole-designs.com>
Subject: Re: Perl Email With Netscape
Message-Id: <37C1450A.2234DDD1@blackhole-designs.com>
Was not expecting that at all
Jimmy
David Cassell wrote:
> Jimmy Humphrey wrote:
> [improperly-located quote moved to *before* reply]
>
> > Abigail wrote:
> > > Jimmy Humphrey (jimmy@blackhole-designs.com) wrote on MMCLXXXII September
> > > MCMXCIII in <URL:news:37BFF5AF.ADA4EB95@blackhole-designs.com>:
> > > ## I was wondering if it is possible to send e-mail in Netscape 4.6 with a
> > > ## random quotes using perl 518 (windows perl) acting as the signature
> > > ## file.
> > >
> > > And your Perl question is?
>
> > My question was how I could use perl to randomly generate quotes for my netscape
> > e-mail in the signature file.
>
> Jimmy, Jimmy, Jimmy. I believe you missed Abigail's point.
> The point was that the ability to do such a thing is dependent
> on the flexibility of the newsreader, so this is really a
> Netscape/news question. Not a Perl question.
>
> If you come back and say:
> [1] I researched this, and the file used for the .sig can be
> a pipe to a program;
> [2] I tried writing this myself and got to here, but I got
> the following error, so I need some programming advice;
> and
> [3] I promise I will put my replies *after* the words I am
> replying to, as per standard Usenet protocol;
>
> then you can expect some help in this ng. But don't
> expect that the cranky denizens herein will write you a
> free script.
>
> HTH,
> David
> --
> David Cassell, OAO cassell@mail.cor.epa.gov
> Senior computing specialist
> mathematical statistician
------------------------------
Date: Mon, 23 Aug 1999 13:29:14 GMT
From: Jon Peterson <jpeterson@office.colt.net>
Subject: Re: Perl Email With Netscape
Message-Id: <K0cw3.240$u07.1744@news.colt.net>
Jimmy Humphrey <jimmy@blackhole-designs.com> wrote:
> Was not expecting that at all
[snip gruff fluff re jeopardy, NAPQ etc]
Nobody expects the Spanish inquisition!
------------------------------
Date: Mon, 23 Aug 1999 15:50:25 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Perl Email With Netscape
Message-Id: <Pine.HPP.3.95a.990823154749.22841I-100000@hpplus03.cern.ch>
On Mon, 23 Aug 1999, Jimmy Humphrey wrote:
> Was not expecting that at all
and then quotes, apparently unread or disregarded:
> > [improperly-located quote moved to *before* reply]
and proceeds to improperly quote again.
Are you really so thick, or is it just an act?
news.announce.newusers could help you to avoid embarrassing yourself in
public yet again.
------------------------------
Date: Mon, 23 Aug 1999 12:28:46 GMT
From: Jon Peterson <jpeterson@office.colt.net>
Subject: Re: problem with some system calls and passing variables to them.
Message-Id: <28bw3.238$u07.1768@news.colt.net>
Rod <rod@killerwords.com> wrote:
> however htpasswd wants you to input the password and then confirm it and you
> cant do it from the command line. so I tried
> open(HTPASS, "|htpasswd -c .htpasswd $user");
> print HTPASS "$pass";
> print HTPASS "$pass";
> close (HTPASS);
When you confirm your password by hand, you hit the return key
after typing the password. You also need to have this return character when
you get Perl to type for you. Ty:
print HTPASS "$pass\n";
print HTPASS "$pass\n";
------------------------------
Date: Mon, 23 Aug 1999 21:03:06 +0800
From: Mars <mars@visbyte.com>
Subject: Rebuild perl
Message-Id: <37C14689.4EBFF94C@visbyte.com>
I encounter a problem recompiling Perl. Here is the info:
I am setting up a Sybase SQL server on a RedHat 6.0 Linux machine and
decide to write application in Perl with sybperl. During installing
sybperl, the 'make test' fails because of the conflict between Sybase DB
library and Berkeley DB library. Therefore, I have to recomple Perl.
I run sh Configure and answer all the questions prompted with default
answers except leaving out -ldb at the linking library section. 'make
test' fails on test 12 on anydbm.t. Now I have no idea how to make it
work.
Could anyone please help me.
Mars
------------------------------
Date: Mon, 23 Aug 1999 14:13:39 GMT
From: Bob Showalter <bshow@my-deja.com>
Subject: Re: Redex and Efficiency
Message-Id: <7prku8$2v0$1@nnrp1.deja.com>
#2 may be more efficient, but:
a) they are not equivalent at all
b) #2 has an apparent bug. The line
if ($find="$zip"){
is an assignment. If you want to compare, you need == or eq. The ==
operator is a numeric comparison, so a conversion to numeric may slow
things down.
c) You don't say what $find is. Is that the "very large db?" What is
its format?
d) I cannot see why you are splitting into individual characters in #1,
except for the capturing parens in the regex. But we don't know why you
are capturing the last 3 chars.
Anyway, if $find is a giant string of interesting zip codes strung
together, a typical speedy way to do lookups would be to load the zip
codes into a hash and then do your lookups against the hash.
In article <7pqaqq$aeu$1@nntp1.atl.mindspring.net>,
<joeyandsherry@mindspring.com> wrote:
> Hello,
>
> Thanks in advance...
>
> I've recently discovered regex and am now able to identify
with: "..oh my
> god, it's full of stars."
>
> ...anyway.
>
> If I wanted to make a script that would search for a zip code in a
very
> large db, which would be the most efficient:
>
> 1.
> $zip='12345';
> ($a, $b, $c, $d, $e)= split(//, $zip);
> if ($find=~/$a$b($c$d$e)/){
> $xyz="yes";}
>
> OR
>
> 2.
> $zip='12345';
> if ($find="$zip"){
> $xyz="yes";}
>
> Thanks alot!
>
> Joey
> -The Race is to the Driven, not the Swift.
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 23 Aug 1999 10:37:40 -0400
From: <joeyandsherry@mindspring.com>
Subject: Re: Redex and Efficiency
Message-Id: <7prlmh$p2l$1@nntp9.atl.mindspring.net>
Thanks....back to the books.
------------------------------
Date: Mon, 23 Aug 1999 08:58:58 -0400
From: JP <Jeff.T.Parker@compaq.com>
Subject: Re: Resolving, Capturing, Storing a file on the network
Message-Id: <37C14592.2C28B97@compaq.com>
Hmmmm, one of two scenarios took place here:
1. I stumped the entire newsgroup with that last question and was forced to
find the answer myself -done successfully last week. -or
2. My question wasn't worthy for anyone (except a gallant e-mailed effort
by A.B. using a "cookie" solution) and was forced to find the answer myself
-done successfully last week.
Anyway, the answer lied simply in a CGI script for downloading. Don't
bother trying to say, "Oh, yea, of course I could have said that..."
Post-coital flaming doesn't count.
JP wrote:
> After the Perl FAQ, after the idiot's guide to CGI programming, after
> reading & hoping
> for a gem in the already posted mail of this and other newsgroups, I
> grew weary
> and decided to experiment with a few newbie lines of code.
> ....~~yea, right. That was a while of wasted effort.
> Feel free to flame if that's your normal M.O. for newbies.
> But, here's my question (in addition to all the others out there):
> In my current script, a user has inputed a path to a remote file, say:
> I:\somedir\anotherdir\ohanother\yetanother\Config.txt
> (yes, note the mapped drive, evil empire OS being the client's)
> This path, stored in say, variable $FileFoo, means little to the machine
> the
> perl script resides on since it's certainly not the same mapping.
> Q: how to resolve that mapping, find the file & allow it to be used?
> Bonus Q: how to use it? How to rewrite it to a "control" file, always
> where perl will know how to find it?
> -you're forever in my debt for being challenged, all you japh's.
------------------------------
Date: Mon, 23 Aug 1999 09:11:31 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Shell vs Perl
Message-Id: <37C15693.C7BBDBDC@texas.net>
David Cassell wrote:
>
> Alan Barclay wrote:
> >
> > In article <7pkh1j$e79$1@nnrp1.deja.com>, <kcounts@my-deja.com> wrote:
> > >The system administrator at my workplace doesn't believe
> > >that a Perl program can be written to mimic the functionality of the
> > >below shell script and still keep as simple as the shell script.
> >
> > Maybe not. Nothing wrong with using shell scripts for things which
> > are easy in shell. However there are many problems which are very
> > very complex to do in shell script and very easy to do in Perl.
> > There are far fewer problems which are easy in shell and complex
> > in Perl.
>
> I agree. But still, how do you need a page and a half to write
> this code? Even badly? Is the sysadmin writing his own sort
> subroutines?
>
> David
Four lines per page?
- Tom
------------------------------
Date: Mon, 23 Aug 1999 16:14:24 +0200
From: "Pletschette André" <andre.pletschette@ltam.lu>
Subject: short question - short answer
Message-Id: <7prkuq$j79$1@calais.pt.lu>
hi, I need a fast answer please,
how can I take Newline's as parameter's for the command-line to a perl
Script?
I mean, why can't I say
perl prog.pl \n\n \n?
Thank's for any help.
------------------------------
Date: Mon, 23 Aug 1999 14:46:29 GMT
From: Jon Peterson <jpeterson@office.colt.net>
Subject: Re: short question - short answer
Message-Id: <99dw3.242$u07.1701@news.colt.net>
Pletschette André <andre.pletschette@ltam.lu> wrote:
> hi, I need a fast answer please,
> how can I take Newline's as parameter's for the command-line to a perl
> Script?
> I mean, why can't I say
> perl prog.pl \n\n \n?
This is really a shell issue.
Try this where your prompt is shown as $
$ perl prog.pl "
>
>
>"
Basically, type perl prog.pl " and then hit return. You'll get the new prompt
character > and you can carry on typing until you give a closing " character.
What you type is passed to perl, so if you hit return, that will get passed
as a linebreak character.
------------------------------
Date: Mon, 23 Aug 1999 13:19:57 +0200
From: GiN <wablief@freemail.nl>
Subject: socket timeout
Message-Id: <37C12E5D.D9A15913@freemail.nl>
--------------DC9B3D0F26BB0E7FDEDB716A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi I am having problems with my portscanner in PERL.
while ($beginport < $maxport) {
print "Scanning: $beginport\n";
if ($child = fork) {
sleep 4;
kill 9, $child if $child; # this
should kill the child if it takes to long to connect
}
else {
if (scan($beginport))
{ #the
socket opener
print "SERVER: $target PORT: $beginport STATUS: open.\n";
}
}
$beginport++;
}
my problem is: the loop is weird and the timeout/kill is not functioning wel..
if you know the answer, please e-mail to : no-gin@dds.nl (without "no-")
thanks advanced!!!
--
#phreak.nl http://www.casema.net/~gin
--------------DC9B3D0F26BB0E7FDEDB716A
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi I am having problems with my portscanner in PERL.
<br>
<p>while ($beginport < $maxport) {
<br> print "Scanning: $beginport\n";
<p> if ($child = fork) {
<br> sleep 4;
<br> kill 9, $child if $child;
# this should kill the child if it takes to long to connect
<br> }
<br> else {
<p> if (scan($beginport)) {
#the socket opener
<br>
print "SERVER: $target PORT: $beginport STATUS: open.\n";
<br> }
<br> }
<br> $beginport++;
<br>}
<br>
<pre>my problem is: the loop is weird and the timeout/kill is not functioning wel..</pre>
<pre>if you know the answer, please e-mail to : no-gin@dds.nl (without "no-")</pre>
<pre></pre>
<pre>thanks advanced!!!</pre>
<pre></pre>
<pre>--
#phreak.nl <A HREF="http://www.casema.net/~gin">http://www.casema.net/~gin</A></pre>
</html>
--------------DC9B3D0F26BB0E7FDEDB716A--
------------------------------
Date: Mon, 23 Aug 1999 12:19:04 GMT
From: Vincent Murphy <vmurphy@gamora.ndhm.gtegsc.com>
Subject: Re: Sort Files by Date and then Name
Message-Id: <xjg1zcuk7uy.fsf@gamora.ndhm.gtegsc.com>
>>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:
>> opendir( DIR, $dir ) || die "can't open $dir: $\n";
>> print map { "$_\n" } sort { -M "$dir/$b" cmp -M "$dir/$a" } readdir(DIR);
>> closedir( DIR );
Larry> Your mother should have warned you about doing stat()s on files
Larry> for each and every sort comparison. Try that on a directory of,
Larry> say, a thousand files, and go out for some coffee.
She has warned me about these things and I just don't listen - though I
should. :-)
BTW, why would you have a thousand files in one directory? Not that I have
anything about have 1/2 ton of files in a directory, but I have never seen
this.
--
Vinny
------------------------------
Date: 23 Aug 1999 14:10:25 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Sort Files by Date and then Name
Message-Id: <37c14841_2@newsread3.dircon.co.uk>
Vincent Murphy <vmurphy@gamora.ndhm.gtegsc.com> wrote:
>
> BTW, why would you have a thousand files in one directory? Not that I have
> anything about have 1/2 ton of files in a directory, but I have never seen
> this.
>
The directory /var/spool/news/comp/lang/perl/misc on my system will have
tens of thousands of files in it - also here at work we have a directory
that contains the zonefiles for each domain that we host: 6953 files at
the last look.
/J\
--
"The internet is like a car boot sale" - Jon Sopel, BBC News
------------------------------
Date: Mon, 23 Aug 1999 12:28:35 +0100
From: Robin Becker <robin@jessikat.demon.co.uk>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <wuvtICAjBTw3Ewxa@jessikat.demon.co.uk>
In article <37c126a6$0$813@newsreader.alink.net>, xah <xah@weborder.com>
writes
>
>Tom Christiansen wrote in message <37b414d7@cs.colorado.edu>...
>> [courtesy cc of this posting mailed to cited author]
>>
>>Legibility is purely subjective.
>>
>>How legible do you find Greek, Arabic, Russian, or Chinese? And what
>>does the character set actually have to do with any inherent complexity
>>of the grammar or richness of expressive vocabulary?
>>
>>Answer: nothing whatsoever.
>
>
>I'd like to extend what Tom Chrisiansen has said.
>
...
>On a personal note... Do you know what a computer science degree is these
>days? They require you understand shits like lambda calculus, logic, graph
>theory, combinatorics, or even algorithms?? All for what? All the Perl
>programers I know doesn't understand any of these, and they all are making
>big bucks in fortune 500. I'm not ashamed that I dropped out of school. I
>hope that Larry and Tom's teachings will eventually make such subjects
>disappear for good.
>
presumably they'll stop schools in Kansas teaching bible studies in
favour Larry & Tom readings.
>My humble $0.02.
>
> Xah
> xah@best.com
> http://www.best.com/~xah/PageTwo_dir/more.html
> "Your nonsense is no better than mine." --Mathematician of metaland.
>
>
>
>
--
Robin Becker
------------------------------
Date: Mon, 23 Aug 1999 13:13:55 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <Pine.HPP.3.95a.990823131315.22841G-100000@hpplus03.cern.ch>
On Mon, 23 Aug 1999, xah wrote:
> Have you ever glanced at a graduate math text? It's probably all Greeks to
> you. However, if someone in the know who translated all the symbolism to
> plain English, then it becomes legible.
And probably less comprehensible...
------------------------------
Date: Mon, 23 Aug 1999 11:59:19 GMT
From: kaz@ashi.FootPrints.net (Kaz Kylheku)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7s2dtk.vsl.kaz@ashi.FootPrints.net>
On Mon, 23 Aug 1999 03:48:10 -0700, xah <xah@weborder.com> wrote:
>
>Tom Christiansen wrote in message <37b414d7@cs.colorado.edu>...
>> [courtesy cc of this posting mailed to cited author]
>>
>>Legibility is purely subjective.
>>
>>How legible do you find Greek, Arabic, Russian, or Chinese? And what
>>does the character set actually have to do with any inherent complexity
>>of the grammar or richness of expressive vocabulary?
>>
>>Answer: nothing whatsoever.
>
>
>I'd like to extend what Tom Chrisiansen has said.
>
>Have you ever glanced at a graduate math text? It's probably all Greeks to
>you. However, if someone in the know who translated all the symbolism to
>plain English, then it becomes legible.
I doubt that translating the elegant, condensed notation into verbose English
would result in anything legible or useful.
>It really depends on who's doing the
>reading. If you are a math guy, then perhaps symbols is your thing. Most of
>us would prefer English. Legibility is purely subjective.
If I wanted to understand the graduate math text, I'd make the effort to learn
the symbols and whatever other background information I needed. English would
be needed in acquiring this information, but after that it would be a huge
hinderance to manipulate ideas using English.
>However, the ivy tower class of buttheads insist on symbolism for math,
>clinging to the fancy that certain ideas are better expressed in certain
>language. They created a whole barrier of entry. You couldn't believe what
>kind of perverted use of symbols they invent. I know because I've been there
Mathematics is the invention and manipulation of symbols, so you can
hardly blame these guys for doing their jobs in life.
>On a personal note... Do you know what a computer science degree is these
>days? They require you understand shits like lambda calculus, logic, graph
>theory, combinatorics, or even algorithms??
Maybe at the ``ivy league'' schools. Where I studied I did all networking,
advanced operating systems, compilers, advanced machine architectures,
numerical analysis (which I flunked), that sort of thing. With a big dose of C
hacking in all of these. (Of course logic and algorithms as well, doh!)
The studies that you describe are intended for people who are destined
to become academics rather than software developers. To ``go on'' as they say.
I think you simply went to the wrong school, one that didn't offer the hands on
systems programming and software development experience.
Incidentally why would you be advocating Perl if you don't like terse
``mathematical'' notations? I don't get it. For the most part, Perl programs
look like line noise to the uninitiated. If you prefer English to terse
symbols, shouldn't you be advocating AppleScript or something? Your outlook
appears to be hopelessly inconsistent.
------------------------------
Date: 23 Aug 1999 14:28:12 GMT
From: graham@sloth.math.uga.edu (Graham Matthews)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <7prlps$c05$1@cronkite.cc.uga.edu>
xah (xah@weborder.com) wrote:
: On a personal note... Do you know what a computer science degree is these
: days? They require you understand shits like lambda calculus, logic, graph
: theory, combinatorics, or even algorithms?? All for what? All the Perl
: programers I know doesn't understand any of these, and they all are making
: big bucks in fortune 500.
And here we have the true meaning of life revealed. The only point in learning
anything is to make big bucks in fortune 500. What a pearl of wisdom that is!
graham
--
So we starve all the teachers
And recruit more marines
How come we don't even know what that means
Its obvious
------------------------------
Date: 23 Aug 1999 09:05:32 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7s2lb3.k6b.abigail@alexandra.delanet.com>
xah (xah@weborder.com) wrote on MMCLXXXIII September MCMXCIII in
<URL:news:37c126a6$0$813@newsreader.alink.net>:
""
"" However, the ivy tower class of buttheads insist on symbolism for math,
"" clinging to the fancy that certain ideas are better expressed in certain
"" language. They created a whole barrier of entry. You couldn't believe what
"" kind of perverted use of symbols they invent. I know because I've been there
"" a bit. Their one-language ideology taints our programing world. If you
"" wonder why so many languages uses weird syntax (e.g. python, dylan, lisp,
"" haskell, mercury, mathematica ...ad nausea), you have these guys to thank
"" to.
Yeah, those math texts from the 16th and 17th century, they are sooooo easy
to read, because they lack all the symbols. Not to mention the original
Euclid and those other Greeks, who had no symbols at all!
"" On a personal note... Do you know what a computer science degree is these
"" days? They require you understand shits like lambda calculus, logic, graph
"" theory, combinatorics, or even algorithms?? All for what? All the Perl
"" programers I know doesn't understand any of these, and they all are making
"" big bucks in fortune 500. I'm not ashamed that I dropped out of school. I
"" hope that Larry and Tom's teachings will eventually make such subjects
"" disappear for good.
Hahahahahahahahahahhahahahahaahahahahahaha.
If you think there's much relationship between programming and Computer
Science, you're utterly mistaken. It's the same relationship between
driving your Morris Minor and designing and producing a new car.
Larry and Tom can teach all they want; their teachings will have no impact
on Computer Science what so ever. Just like their teaching will have no
impact on the grow of potatoes in Idaho.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 620
*************************************