[16788] in Perl-Users-Digest
Perl-Users Digest, Issue: 4200 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 1 14:10:40 2000
Date: Fri, 1 Sep 2000 11:10:27 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <967831827-v9-i4200@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 1 Sep 2000 Volume: 9 Number: 4200
Today's topics:
Re: LWP::Parallel joekind@my-deja.com
Multimaps in Perl 5 arindamm1@my-deja.com
Re: My Perl looks like C! <usenet@dstanek.com>
Re: My Perl looks like C! (Abigail)
Re: My Perl looks like C! <spragg@cs.ucdavis.edu>
Re: My Perl looks like C! <spragg@cs.ucdavis.edu>
Re: My Perl looks like C! <spragg@cs.ucdavis.edu>
Re: My Perl looks like C! <spragg@cs.ucdavis.edu>
Net::FTP timeout problem dayre@my-deja.com
Re: Net::FTP timeout problem <peckert@epicrealm.com>
Re: Net::FTP timeout problem <peckert@epicrealm.com>
Re: Newbie needs help! <elephant@squirrelgroup.com>
Re: Newbie needs help! <godzilla@stomp.stomp.tokyo>
Re: Newbie needs help! <justin.flavin@ntlworld.com>
Re: Newbie needs help! <russ_jones@rac.ray.com>
Re: Newbie needs help! <camerond@mail.uca.edu>
Re: Newbie needs help! (I Hawes)
Re: Newbie needs help! (I Hawes)
Re: no $ENV{REMOTE_USER} ? <techsupp@helpconsulting.net>
Re: no $ENV{REMOTE_USER} ? <flavell@mail.cern.ch>
Re: no $ENV{REMOTE_USER} ? <alesr@siol.net>
Re: open web file <jeff@vpservices.com>
Re: osh <lauren_smith13@hotmail.com>
Re: osh <jeff@vpservices.com>
Re: osh <bcaligari@my-deja.com>
OT: Baby clothes (was Re: osh) <lauren_smith13@hotmail.com>
Re: output fun (Rafael Garcia-Suarez)
Re: output fun <ren.maddox@tivoli.com>
Re: output fun (Abigail)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 01 Sep 2000 16:49:54 GMT
From: joekind@my-deja.com
Subject: Re: LWP::Parallel
Message-Id: <8oomn9$ukq$1@nnrp1.deja.com>
Can anyone help me with speeding up my script? I would really
appreciate some code to help me out.
In article <8onb8e$d9u$1@nnrp1.deja.com>,
joekind@my-deja.com wrote:
> I have tried using forking too but I could not get the program to wait
> until it had got all of the content from the sites. How did you get
> yours to wait and how fast was did your program get the content? Any
> code that you may have will help greatly.
>
> In article <x7r974pxi3.fsf@home.sysarch.com>,
> Uri Guttman <uri@sysarch.com> wrote:
> > >>>>> "j" == joekind <joekind@my-deja.com> writes:
> >
> > j> The problem is that after connecting to a few sites it says
> > j> LWP::Parallel cannot handle request (501 error).
> > j> Can someone please help me because I want to make this script
> grab the
> > j> content from these sites fast and that is why I am using
> > j> LWP::Parallel::UserAgent. I have just used LWP::UserAgent
> before and
> > j> got it to work, but I need it to be faster.
> >
> > i tried to use LWP::Parallel and didn't get good results. i switched
> to
> > using forked processes which run plain LWP and IO::Select to get the
> > pages back from the children.
> >
> > i think LWP::Parallel is too complicated and it has too many
> wierdnesses
> > in LWP to overcome.
> >
> > uri
> >
> > --
> > Uri Guttman --------- uri@sysarch.com ----------
> http://www.sysarch.com
> > SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX
> Consulting
> > The Perl Books Page ----------- http://www.sysarch.com/cgi-
> bin/perl_books
> > The Best Search Engine on the Net ----------
> http://www.northernlight.com
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 01 Sep 2000 17:40:28 GMT
From: arindamm1@my-deja.com
Subject: Multimaps in Perl 5
Message-Id: <8oopm9$2b5$1@nnrp1.deja.com>
Is it possible to have multimap data structures in Perl like in C++ STL
libraries.
Thanks,
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 1 Sep 2000 12:13:43 -0400
From: "David Stanek" <usenet@dstanek.com>
Subject: Re: My Perl looks like C!
Message-Id: <8ookde$tmj$1@news.chatlink.com>
Try this one: http://www.perl.com/pub/doc/manual/html/pod/perlstyle.html
David Stanek
"Jim Cook" <jcook@strobedata.com> wrote in message
news:39AFBD21.145C3DA8@strobedata.com...
> > >One of my biggest concerns is that my Perl code looks like C code.
When I
> > >look at what Real Perl Hackers write, it doesn't look like C at all.
>
>
> > read http://www.perl.org/press/style-guide.html
>
> I thought maybe I could learn something too, but that seems to be just
> an opening page with no links. It says to spell "Perl" for the language
> and "perl" for the interpreter.
>
> Is there really a style guide to _coding_ Perl, instead of a style guide
> for _spelling_ it?
>
> --
> jcook@strobedata.com Live Honourably 4/1 - 4/3 + 4/5 - 4/7 + . . .
> 2000 Tuesdays: Feb/last 4/4 6/6 8/8/ 10/10 12/12 9/5 5/9 7/11 11/7 3/14
> Strobe Data Inc. home page http://www.strobedata.com
> My home page O- http://jcook.net
------------------------------
Date: 01 Sep 2000 17:10:24 GMT
From: abigail@foad.org (Abigail)
Subject: Re: My Perl looks like C!
Message-Id: <slrn8qvomc.8ac.abigail@alexandra.foad.org>
Jim Cook (jcook@strobedata.com) wrote on MMDLVIII September MCMXCIII in
<URL:news:39AFBD21.145C3DA8@strobedata.com>:
..
.. Is there really a style guide to _coding_ Perl, instead of a style guide
.. for _spelling_ it?
Yes, and present everywhere were perl is present!
man perlstyle
Or the equivalent on your local OS.
Abigail
--
map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;
print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";
------------------------------
Date: 1 Sep 2000 17:49:38 GMT
From: Adam Trace Spragg <spragg@cs.ucdavis.edu>
Subject: Re: My Perl looks like C!
Message-Id: <8ooq7i$t3g$1@mark.ucdavis.edu>
Wonderful... thanks for all your responses.
I realize you all have no idea what my Perl code looks like, and probably
assume the worst, but that's fine with me.
"Learn map and grep" were some common words of advice which I will follow.
I think that most of it just has to do with experience with the language, and
and active desire to learn more about it. I have a little bit of the former
and a whole lot of the latter. I think I will decide that if I continue to
read and learn new tricks, then my problem will go away mostly by itself.
The problem is that I'm a trained C/C++ programmer, so when I need to do
something in Perl, C constructs (ie, for loops) are generally the first thing
that come to my mind. But I'm definitely improving in terms of thinking in
terms of lists vs. arrays, etc.
Thanks again for all your help!
Adam
------------------------------
Date: 1 Sep 2000 17:52:51 GMT
From: Adam Trace Spragg <spragg@cs.ucdavis.edu>
Subject: Re: My Perl looks like C!
Message-Id: <8ooqdj$t3g$2@mark.ucdavis.edu>
Uri Guttman <uri@sysarch.com> wrote:
: this is a newsgroup, not a call in radio show. :)
That's what you think! Just wait till you find the station that this is
all broadcast on!
: well, if you still code like c in perl, then i wouldn't rate you as
: pretty competent. that is a hallmark of a beginner perl hacker.
Fair enough.
: best thing would be for you to post some of your code here. then let the
I'll see if I can find something appropriate. All the code posted here
generally seems to annoy everyone else, so I've been a little apprehensive.
: written by idjits. they were reading in a 5MB file using getc (which is
: a slow operator called for each char instead of record i/o) in perl!!
: and doing that 5 times after creating some temp files. my rewrite was
: over 60 times faster.
Heh. I'm not that bad... And in spite of how a post or two might come across,
I like to think I'm actually pretty clever and good at absorbing new things.
Adam
------------------------------
Date: 1 Sep 2000 17:53:58 GMT
From: Adam Trace Spragg <spragg@cs.ucdavis.edu>
Subject: Re: My Perl looks like C!
Message-Id: <8ooqfm$t3g$3@mark.ucdavis.edu>
Jakob Schmidt <sumus@aut.dk> wrote:
: - stop using the C-style for-loop (it's rarely the best choice)
Good call.
: - get used to thinking of lists and arrays in a certain Perly way :-)
Done.
: - use grep and map, use splice and substr as an lvalue
Will do for the former, will contine for the latter.
Thanks!
Adam
------------------------------
Date: 1 Sep 2000 17:55:00 GMT
From: Adam Trace Spragg <spragg@cs.ucdavis.edu>
Subject: Re: My Perl looks like C!
Message-Id: <8ooqhk$t3g$4@mark.ucdavis.edu>
Abigail <abigail@foad.org> wrote:
: There are two options:
: - Shoot all Real Perl Hackers, so everyone will code Perl as in C.
: - Get a different book.
I'm still trying to figure you out myself, Abigail... :)
Adam
------------------------------
Date: Fri, 01 Sep 2000 16:16:40 GMT
From: dayre@my-deja.com
Subject: Net::FTP timeout problem
Message-Id: <8ookoj$s4d$1@nnrp1.deja.com>
I'm having a timeout problem with the NET::Ftp
package, upon calling the directory listing
method. ($ftp is the handle to the new'd FTP
object)
$ftp->ls;
i sometimes receive this:
Timeout
at /usr/lib/perl5/site_perl/5.005/Net/FTP.pm line
918
and the script exits prematurely. I'd like to
catch this error if i could so i could handle it
properly, but i'm not sure where it actually
originates.
Any ideas ?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 01 Sep 2000 17:43:34 GMT
From: Paul Eckert <peckert@epicrealm.com>
Subject: Re: Net::FTP timeout problem
Message-Id: <39AFEAE7.2FAEB7A4@epicrealm.com>
dayre@my-deja.com wrote:
>
> I'm having a timeout problem with the NET::Ftp package
> $ftp->ls;
>
> i sometimes receive this:
> Timeout
> at /usr/lib/perl5/site_perl/5.005/Net/FTP.pm line 918
>
The Timeout is fired from the select statement in Cmd.pm, which is implicitly
invoked from the read() in FTP.pm.
First off, it looks like the problem's on the remote machine, not in the FTP
package. The ls should _never_ timeout, even on a busy machine.
Secondly, have you set an abnormally short timeout in the options to the new()
method?
use Net::FTP;
$ftp = Net::FTP->new("some.host.name", Debug => 0, Timeout => 1);
$ftp->login("anonymous",'me@here.there');
$ftp->ls;
$ftp->get("that.file");
$ftp->quit;
The ls above will almost certainly timeout with such a short Timeout value.
If you're setting it explicitly, set it to something reasonable (it defaults to
120 seconds, which is kinda long, IMHO).
If you're _still_ getting the timeout firing and you can't fix the remote
machine and you've got the Timeout value set long enough, try this:
use Net::FTP;
$ftp = Net::FTP->new("some.host.name", Debug => 0, Timeout => 1);
$ftp->login("anonymous",'me@here.there');
my @flist = $ftp->ls;
You should now be able to check whether @flist is defined or not with the
following code snippet:
if (not defined @flist) {
# handle the timeout
} else {
# do something with @flist
}
If you own the remote box that's timing out, however, I'd fix the problem
there rather than mucking about with it on the local side.
Paul
--
Paul Eckert
Sr. Software Engineer
Epicrealm Inc.
1651 N. Glenville Dr., Suite 212
Richardson, TX 75081
(972) 479-0135 x300
peckert@epicrealm.com
------------------------------
Date: Fri, 01 Sep 2000 17:46:27 GMT
From: Paul Eckert <peckert@epicrealm.com>
Subject: Re: Net::FTP timeout problem
Message-Id: <39AFEB9B.22752DAD@epicrealm.com>
dayre@my-deja.com wrote:
>
> I'm having a timeout problem with the NET::Ftp package.
Whoops. In my prior post, I left the try-this code Timeout set to 1.
Don't do that. Use this:
use Net::FTP;
$ftp = Net::FTP->new("some.host.name", Debug => 0, Timeout => 30);
$ftp->login("anonymous",'me@here.there');
my @flist = $ftp->ls;
If you haven't got a response in 30 seconds, weirdness is happening.
--
Paul Eckert
Sr. Software Engineer
Epicrealm Inc.
1651 N. Glenville Dr., Suite 212
Richardson, TX 75081
(972) 479-0135 x300
peckert@epicrealm.com
------------------------------
Date: Fri, 01 Sep 2000 15:30:15 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: Newbie needs help!
Message-Id: <MPG.141a68d2cfbdf3f0989745@localhost>
I Hawes <ikh1@cornell.edu> wrote ..
>I need a script that will collect the following information into a file,
>moving recursively, for every file in every directory, beginning from the
>current directory:
>
>full path name
>file name
>maximum line length
>number of lines
>whether the file has a constant or a variable line length
>number of carriage returns
>number of control characters
>number of non-ascii characters
>total characters (uncompressed)
>total characters (compressed)
>
>To also get file owner and permissions info would be terrific, but is not
>necessary.
>
>The files are all compressed with gzip, and reside on a Windows 2000 operating
>system. The output for each file should be all on one line, as this will be
>used as input for a database. Any help you could give, even small fragments
>of code, would be most helpful. Thanks.
start with the File::Find module
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Fri, 01 Sep 2000 08:28:59 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Newbie needs help!
Message-Id: <39AFCB3B.D20EC7D@stomp.stomp.tokyo>
I Hawes wrote:
> I need a script that will collect the following information into a file,
> moving recursively, for every file in every directory, beginning from the
> current directory:
(snipped arrogant demands)
So sit down, roll up your sleeves and get to work writing this script.
Godzilla!
--
Stereotypical Perl Monger.
http://la.znet.com/~callgirl/monger.cgi
------------------------------
Date: Fri, 1 Sep 2000 16:45:03 +0100
From: "Justin Flavin" <justin.flavin@ntlworld.com>
Subject: Re: Newbie needs help!
Message-Id: <8ooivk$b1f$1@newsg3.svr.pol.co.uk>
I Hawes <ikh1@cornell.edu> wrote in message
news:8oog33$qqb$2@news01.cit.cornell.edu...
> I need a script that will collect the following information into a file,
> moving recursively, for every file in every directory, beginning from the
> current directory:
To processing all files in a directory recursively use the standard
File::Find module
e.g.
use File::Find
sub process_file P
# do whatever
}
find (\&process_file, @DIRLIST);
More info on this is in receipe 9.7 of the Perl Cookbook.
> number of lines
Again, from the Perl Cookbook:
open (FILE, "< $file") or die "can't open $file: $!";
$count++ while <FILE>;
# $count now holds the number of lines read
That's all for now - i might actually write a full Perl script based on the
requirements you specified - it'll be good practise
for me as I'm just learning Perl!
I hope other people can provide code snippets on this one though.
If you dont have the Perl Cookbook, I'd recommend you go out and buy it
immediately!
Regards,
Justin Flavin, UK
------------------------------
Date: Fri, 01 Sep 2000 11:37:19 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Newbie needs help!
Message-Id: <39AFDB3F.8A0974EE@rac.ray.com>
I Hawes wrote:
>
> I need a script that will collect the following information into a file,
> moving recursively, for every file in every directory, beginning from the
> current directory:
>
This is the third or fourth post asking for this same result. It seems
not to be a coincidence that this is also the first week or two of
school in a lot of places, like maybe at cornell.edu.
I wonder if your instructor ever reads usenet. I wonder if your
instructor knows about http://www.plagiarism.org
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
Date: Fri, 01 Sep 2000 12:45:11 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: Newbie needs help!
Message-Id: <39AFEB27.6CBF052C@mail.uca.edu>
jason wrote:
>
> I Hawes <ikh1@cornell.edu> wrote ..
> >I need a script that will collect the following information into a file,
> >moving recursively, for every file in every directory, beginning from the
> >current directory:
> [snip]
>
> start with the File::Find module
Nope, start with
#!/[path_to_perl] -w
use strict;
Cameron
--
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu
------------------------------
Date: Fri, 01 Sep 2000 17:57:53 GMT
From: ikh1@cornell.edu (I Hawes)
Subject: Re: Newbie needs help!
Message-Id: <8ooqkm$18o$1@news01.cit.cornell.edu>
Thank you. I truely do appreciate your help!
In article <8ooivk$b1f$1@newsg3.svr.pol.co.uk>, "Justin Flavin"
<justin.flavin@ntlworld.com> wrote:
>From: "Justin Flavin" <justin.flavin@ntlworld.com>
>Newsgroups: comp.lang.perl.misc
>Subject: Re: Newbie needs help!
>Date: Fri, 1 Sep 2000 16:45:03 +0100
>Organization: Customer of Energis Squared
>Lines: 44
>Message-ID: <8ooivk$b1f$1@newsg3.svr.pol.co.uk>
>References: <8oog33$qqb$2@news01.cit.cornell.edu>
>NNTP-Posting-Host: modem-8.neilsborium.dialup.pol.co.uk
>X-Trace: newsg3.svr.pol.co.uk 967823156 11311 62.136.73.136 (1 Sep 2000
> 15:45:56 GMT)
>NNTP-Posting-Date: 1 Sep 2000 15:45:56 GMT
>X-Complaints-To: abuse@theplanet.net
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 5.00.2615.200
>X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
>Path:
> newsstand.cit.cornell.edu!news.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!c
>olt.net!diablo.theplanet.net!news.theplanet.net!newspost.theplanet.net!not-for-
>mail
>Xref: newsstand.cit.cornell.edu comp.lang.perl.misc:342136
>Status: N
>
>
>I Hawes <ikh1@cornell.edu> wrote in message
>news:8oog33$qqb$2@news01.cit.cornell.edu...
>
>> I need a script that will collect the following information into a file,
>> moving recursively, for every file in every directory, beginning from the
>> current directory:
>
>To processing all files in a directory recursively use the standard
>File::Find module
>e.g.
>use File::Find
>sub process_file P
># do whatever
>}
>find (\&process_file, @DIRLIST);
>
>More info on this is in receipe 9.7 of the Perl Cookbook.
>
>> number of lines
>
>Again, from the Perl Cookbook:
>
>open (FILE, "< $file") or die "can't open $file: $!";
>$count++ while <FILE>;
># $count now holds the number of lines read
>
>
>That's all for now - i might actually write a full Perl script based on the
>requirements you specified - it'll be good practise
>for me as I'm just learning Perl!
>
>I hope other people can provide code snippets on this one though.
>
>If you dont have the Perl Cookbook, I'd recommend you go out and buy it
>immediately!
>
>Regards,
>Justin Flavin, UK
>
>
>
>
>
------------------------------
Date: Fri, 01 Sep 2000 18:02:26 GMT
From: ikh1@cornell.edu (I Hawes)
Subject: Re: Newbie needs help!
Message-Id: <8ooqt7$18o$2@news01.cit.cornell.edu>
Sorry to put a hole in your theory, but this is for my job. I work in a small
department and our programmer just moved out of town. So I need to figure
this out on my own even though it isn't what I usually do.
In article <39AFDB3F.8A0974EE@rac.ray.com>, Russ Jones
<russ_jones@rac.ray.com> wrote:
>I Hawes wrote:
>>
>> I need a script that will collect the following information into a file,
>> moving recursively, for every file in every directory, beginning from the
>> current directory:
>>
>
>
>This is the third or fourth post asking for this same result. It seems
>not to be a coincidence that this is also the first week or two of
>school in a lot of places, like maybe at cornell.edu.
>
>I wonder if your instructor ever reads usenet. I wonder if your
>instructor knows about http://www.plagiarism.org
------------------------------
Date: Fri, 1 Sep 2000 13:00:15 -0400
From: "tech" <techsupp@helpconsulting.net>
Subject: Re: no $ENV{REMOTE_USER} ?
Message-Id: <keRr5.3$lj6.30@interramp>
What server are you using?
Cheers!
Ken
http://www.helpconsulting.net
Home of:
visiPerl+ 2.0 - The Ultimate PERL IDE!
OfficeTalk - How do you talk in your office?
"Dave A." <noemail@nodomain.com> wrote in message
news:rROr5.301$Mc.12891@nnrp1.ptd.net...
> I have a simple basic html page that uses frames.
> One frame source is a perl script.
>
> The html directory contains .htaccess for authentication.
> All I want to do, is get $ENV{'REMOTE_USER'}
> and display it on the perl script frame.
>
> A simple : Logged In as <b>$ENV{'REMOTE_USER'}</b><br>
> does not work.
>
> I have tried every variation, even retrieved the env variables
(system("env"); )
> and displayed them.
>
> No REMOTE_USER variable is set in the environment.
>
> Is there something I'm missing here ?
>
> REQUEST_METHOD is GET (if that even makes a difference at this point.
>
> Thanks in advance
>
> D.
>
>
>
>
------------------------------
Date: Fri, 1 Sep 2000 19:05:36 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: no $ENV{REMOTE_USER} ?
Message-Id: <Pine.GHP.4.21.0009011902380.2945-100000@hpplus03.cern.ch>
On Fri, 1 Sep 2000, tech blurted out:
> What server are you using?
What relevance does that have to Perl or even to CGI? The CGI
specification is the same for all servers, that's why it's a
_Common_ Gateway Interface.
Either they support it or they don't.
> http://www.helpconsulting.net
[INLINE]
[INLINE]
Help Consulting [INLINE]
[LINK][LINK][LINK][LINK][LINK][LINK]
[LINK]-[USEMAP]
[LINK]-[USEMAP]
[LINK]-[USEMAP]
[LINK]
Very pretty.
[and another jeopardectomy on the NHS]
------------------------------
Date: Fri, 01 Sep 2000 19:44:41 +0200
From: marvin <alesr@siol.net>
Subject: Re: no $ENV{REMOTE_USER} ?
Message-Id: <39AFEB09.3520@siol.net>
tech wrote:
>
> What server are you using?
>
> Cheers!
> Ken
>
> http://www.helpconsulting.net
> Home of:
> visiPerl+ 2.0 - The Ultimate PERL IDE!
> OfficeTalk - How do you talk in your office?
>
> "Dave A." <noemail@nodomain.com> wrote in message
> news:rROr5.301$Mc.12891@nnrp1.ptd.net...
> > I have a simple basic html page that uses frames.
> > One frame source is a perl script.
> >
> > The html directory contains .htaccess for authentication.
> > All I want to do, is get $ENV{'REMOTE_USER'}
> > and display it on the perl script frame.
> >
> > A simple : Logged In as <b>$ENV{'REMOTE_USER'}</b><br>
> > does not work.
> >
> > I have tried every variation, even retrieved the env variables
> (system("env"); )
> > and displayed them.
> >
> > No REMOTE_USER variable is set in the environment.
> >
> > Is there something I'm missing here ?
> >
> > REQUEST_METHOD is GET (if that even makes a difference at this point.
> >
> > Thanks in advance
> >
> > D.
> >
> >
> >
> >
Hi !
I had the same problem.
You need to use CGI and then function remote_user
use CGI;
my $user=remote_user();
But you must have security to that directory, where Perl is,
otherwise it will not work, even if HTML is in protected dir.
Hope It helps.
------------------------------
Date: Fri, 01 Sep 2000 09:52:01 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: open web file
Message-Id: <39AFDEB1.CBD36D0B@vpservices.com>
Gwyn Judd wrote:
>
> I was shocked! How could Abigail <abigail@foad.org>
> say such a terrible thing:
> >Sean Scannell (sean@access-management.com) wrote on MMDLVII September
> >MCMXCIII in <URL:news:ZBAr5.85$WH4.68667@news.pacbell.net>:
> >|| Why does the following die:
> >||
> >|| open (TEMP, 'http://www.foo.com/bar.html') || die
> >
> > ...
> >open() has lots of magic, but only C-API specific and, unfortunally,
> >no HTTP semantics. It would be useful though.
>
> Useful or confusing?
This discussion relates to the "Self-answering questions" interchange
Larry Rossler and I had a few posts back. One of Perl's strengths is
that it uses common metaphors to apply to software and one can often
"intuitively" tell what function to use by its English language
meaning. One of Perl's (and software-speak in general) weaknesses is
that one can often *not* "intuititvely" tell how far these metaphors
go. There are all kinds of things one ought to be able to "open" and
files of any kind are inclduded therin. There are lots of things that
one ought to be able to "find" at the end of a "path". But even in
English, if I tell someone to meet me at the station, it helps to know
if one is traveling by bus or train.
So my $0.02 is that, yes, "open" should apply to all kinds of files, and
yes "path" should apply to both file system and http paths. But
somewhere in there, there needs to be something that requires the user
to specify what kind of path it is. That's what the URI and URL specs
do -- they force us to put the word "train" or "bus" in front of the
word station if we want to be understood. I presume that kind of
specificity would be included in the HTTP semantics Abigail proposes and
therefore any confusion would be the result of under-specification on
the part of the speaker.
--
Jeff
------------------------------
Date: Fri, 1 Sep 2000 09:37:06 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: osh
Message-Id: <8oolrv$tju$1@brokaw.wa.com>
Harry <harry_jen@hotmail.com> wrote in message
news:39AF7BC6.5F8BD962@hotmail.com...
> Hi,
> Could you tell me the use of *.osh files ?
If you don't know, then you probably don't need it. Rename it something
else and then if your system crashes or a cow-orker wonders where the hell
his .osh files went, just rename it back.
And now to make this Perl related:
perldoc -f rename
Lauren
--
print grep ord $_,map{y/a-zA-Z//d;$x.="+ $_";chr(eval $x)}
'J74u43-s2tA1-84n33o45th1er5-12-P3e13-82r48l21H13-a6-76
c40k25er2wx8-y6z13-81'=~m#([^!\n]{3})#g#tr/-0-9//d;print
------------------------------
Date: Fri, 01 Sep 2000 09:54:50 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: osh
Message-Id: <39AFDF5A.3732E002@vpservices.com>
Harry wrote:
>
> Hi,
> Could you tell me the use of *.osh files ?
> Harry
They tell you what operating system you are on when you're drunk.
--
Jeff
------------------------------
Date: Fri, 01 Sep 2000 17:24:00 GMT
From: Brendon Caligari <bcaligari@my-deja.com>
Subject: Re: osh
Message-Id: <8ooomp$17d$1@nnrp1.deja.com>
In article <8oolrv$tju$1@brokaw.wa.com>,
"Lauren Smith" <lauren_smith13@hotmail.com> wrote:
>
> Harry <harry_jen@hotmail.com> wrote in message
> news:39AF7BC6.5F8BD962@hotmail.com...
> > Hi,
> > Could you tell me the use of *.osh files ?
>
> If you don't know, then you probably don't need it. Rename it
something
> else and then if your system crashes or a cow-orker wonders where the
hell
> his .osh files went, just rename it back.
>
> And now to make this Perl related:
>
> perldoc -f rename
>
> Lauren
Lol...in Maltese (my native language) the phoenetic equivalent of 'osh'
actually is the rudest way to refer to the female private parts.
Brendon
++++
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 1 Sep 2000 10:40:12 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: OT: Baby clothes (was Re: osh)
Message-Id: <8oopie$vhs$1@brokaw.wa.com>
Brendon Caligari <bcaligari@my-deja.com> wrote in message
news:8ooomp$17d$1@nnrp1.deja.com...
>
> Lol...in Maltese (my native language) the phoenetic equivalent of 'osh'
> actually is the rudest way to refer to the female private parts.
>
So the baby clothes company Osh Kosh b'Gosh isn't popular over there? ;-)
Lauren
--
print grep ord $_,map{y/a-zA-Z//d;$x.="+ $_";chr(eval $x)}
'J74u43-s2tA1-84n33o45th1er5-12-P3e13-82r48l21H13-a6-76
c40k25er2wx8-y6z13-81'=~m#([^!\n]{3})#g#tr/-0-9//d;print
------------------------------
Date: Fri, 01 Sep 2000 15:54:13 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: output fun
Message-Id: <slrn8qvkkg.7et.rgarciasuarez@rafael.kazibao.net>
Yanick Champoux wrote in comp.lang.perl.misc:
>
> If dubious solutions are fair play, then I suggest
>
> $_="ABCDEFGFEDCBA\n";print&&s/$2/ /gwhile/(F| )(\S)/
>
> which save no less than 4 strokes. :)
$_="ABCDEFGFEDCBA\n";print&&s/$1/ /gwhile/[F ](\S)/
One stroke less.
--
Rafael Garcia-Suarez
------------------------------
Date: 01 Sep 2000 10:18:38 -0500
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: output fun
Message-Id: <m3ya1c2l9t.fsf@dhcp11-177.support.tivoli.com>
tony@svanstrom.com (Tony L. Svanstrom) writes:
> Ren Maddox <ren.maddox@tivoli.com> wrote:
>
> > kcivey@cpcug.org (Keith Calvert Ivey) writes:
> >
> > > Uri Guttman <uri@sysarch.com> wrote:
> > >
> > > >$_="ABCDEFGFEDCBA\n";print;print while y/G/ /||s/.( +)\S/ $1 /g;
> > >
> > > $_="ABCDEFGFEDCBA\n";print,s/G|(?<= ).|.(?= )/ /g while/\S/;
> > >
> > > Four strokes shorter, and avoids printing the extra blank line.
> >
> > $_="ABCDEFGFEDCBA\n";print,s/.( +)./ $1 /,s/G/ /while/\S/;
> >
> > Two strokes shorter.
>
> $_="ABCDEFGFEDCBA\n";$c=9;while($c--){s/\10$c/ /g;print}
>
> Not really a good solution, but, hey, it's one character less. :)
On the contrary, I think it is a good solution, though it is a little
bit broken.
Change the post-decrement to a pre-, and reverse the order of the
substitution and the print, and you avoid printing the extra two blank
lines (oh, and start with 8 instead of 9), all for the same length:
$_="ABCDEFGFEDCBA\n";$c=8;while(--$c){print;s/\10$c/ /g}
Even better, change the while to a modifier to save a few characters:
$_="ABCDEFGFEDCBA\n";$c=8;print,s/\10$c/ /gwhile--$c
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 01 Sep 2000 17:24:26 GMT
From: abigail@foad.org (Abigail)
Subject: Re: output fun
Message-Id: <slrn8qvpgl.8ac.abigail@alexandra.foad.org>
Rafael Garcia-Suarez (rgarciasuarez@free.fr) wrote on MMDLVIII September
MCMXCIII in <URL:news:slrn8qvkkg.7et.rgarciasuarez@rafael.kazibao.net>:
:) Yanick Champoux wrote in comp.lang.perl.misc:
:) >
:) > If dubious solutions are fair play, then I suggest
:) >
:) > $_="ABCDEFGFEDCBA\n";print&&s/$2/ /gwhile/(F| )(\S)/
:) >
:) > which save no less than 4 strokes. :)
:)
:) $_="ABCDEFGFEDCBA\n";print&&s/$1/ /gwhile/[F ](\S)/
:)
:) One stroke less.
$_="ABCDEFGFEDCBA\n";print,s/$1/ /gwhile/[F ](\S)/
Saved another stroke.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 4200
**************************************