[12195] in Perl-Users-Digest
Perl-Users Digest, Issue: 5795 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 26 19:07:16 1999
Date: Wed, 26 May 99 16:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 26 May 1999 Volume: 8 Number: 5795
Today's topics:
Re: "cat"-ing three files into three files. garthwebb@my-deja.com
.htaccess file <mace@calweb.com>
Re: .htaccess file (Bob Trieger)
Re: .htaccess file <emschwar@rmi.net>
Re: File I/O Help Needed (Larry Rosler)
Re: Help needed! <cassell@mail.cor.epa.gov>
Re: Help, I'll pay money for solution!!! <abey@cs.ucr.edu>
Re: location of socket.pm <cassell@mail.cor.epa.gov>
Module which enables you to program Internet Service Ma (Jeroen Kustermans)
Net::SSLeay and sending a cookie back to server mjz01@health.state.ny.us
Re: OO: Perl resources (Alastair)
Re: Pattern Matching -- Up a Certain Creek with no Padd (Matthew Bafford)
Re: Perl compiler...If or when <gregm@well.com>
Perl for beginners (Lee & Helen)
Re: Perl for beginners (Bob Trieger)
Re: Perl for beginners (Alastair)
Re: perl syntax error <jdporter@min.net>
perldoc -f alarm <ppith@my-deja.com>
Re: Q: Truncate a string (Larry Rosler)
Re: Q: Truncate a string <cassell@mail.cor.epa.gov>
Re: removings " "s from strings <cassell@mail.cor.epa.gov>
Re: removings " "s from strings <cassell@mail.cor.epa.gov>
Re: s/// multiple lines in file from cmd line <cassell@mail.cor.epa.gov>
Re: s/// multiple lines in file from cmd line <otis@my-deja.com>
unexponentialize field from text file <seugenio@man.amis.com>
Re: using ~ with chdir (Jozxyqk)
variables and arrays <sfatine@doe.carleton.ca>
Re: workarounds for prototypes <tchrist@mox.perl.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 26 May 1999 22:34:05 GMT
From: garthwebb@my-deja.com
Subject: Re: "cat"-ing three files into three files.
Message-Id: <7ihssu$gsh$1@nnrp1.deja.com>
In article <87pv3ypefu.fsf@camel.cpsgroup.com>,
Dale Henderson <dhenders@cpsgroup.com> wrote:
<snip>
> flock(INFILE,$LOCK_EX ) || die "Can't lock $fname: $!";
---^
Also note that your code (and the code of the two other people who
responded to your post) does not actually lock your file. You are using
the variable $LOCK_EX which, unless you've defined yourself someplace
and didn't post that part of the code, will be undefined. What you
probably meant to do was say:
use Fcntl ':flock';
...
flock(INFILE, LOCK_EX) || die "Can't lock $fname: $!";
'LOCK_EX' is a function, not a scalar variable.
Garth
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 26 May 1999 15:21:23 -0700
From: "Mace" <mace@calweb.com>
Subject: .htaccess file
Message-Id: <374c73cb@calwebnnrp>
Can someone please explain to me how to make and set up a .htaccess file?
Thanks,
Mace
mace@calweb.com
------------------------------
Date: Wed, 26 May 1999 23:03:13 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: .htaccess file
Message-Id: <7iht18$fdg$2@oak.prod.itd.earthlink.net>
[ courtesy cc sent by mail if address not munged ]
"Mace" <mace@calweb.com> wrote:
>Can someone please explain to me how to make and set up a .htaccess file?
C:\>perldoc -f .htaccess
No documentation for perl function `.htaccess' found
What gave you the inkling that your question had anything to do with
perl?
------------------------------
Date: 26 May 1999 16:57:37 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: .htaccess file
Message-Id: <xkfg14jfnha.fsf@valdemar.col.hp.com>
"Mace" <mace@calweb.com> writes:
> Can someone please explain to me how to make and set up a .htaccess file?
Yes, I imagine someone can.
Go ask on the appropriate c.i.w.s.* newsgroup, and somebody might even do
so.
-=Eric
------------------------------
Date: Wed, 26 May 1999 14:52:49 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: File I/O Help Needed
Message-Id: <MPG.11b60d0ca1bd0d0c989b06@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <MPG.11b609dc900b8dcf98991c@news.itg.ti.com> on Wed, 26 May
1999 14:39:15 -0500, Jason McNorton <jmcn@msg.ti.com> says...
...
> open (SAVES, ">$checkfile");
> close (SAVES);
>
> As soon as I put a > so I can write to it, it croaks. If I set
> $checkname directly equal to "/server-root/c1st/1003.chk", they both
> work. Any ideas on why it's working for reading only, but not if I try
> to write? Thanks a ton for any help.
I have no idea, but Perl might. Why don't you let it tell you?
open (SAVES, ">$checkfile") or
die "Can't open '$checkfile' for writing. $!\n";
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 26 May 1999 15:05:08 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Help needed!
Message-Id: <374C7014.AD3B7D4A@mail.cor.epa.gov>
hannibal josh wrote:
>
> Thank you very much for help(Scratchie,Larry Rosler,John Porter,
> Tony Greenwood)There is real gentlemans out there!
Okay, I'm taking the Fifth here. :-)
> But.....i did not understand you or....??
> as i wrote i am really beginner(what is perlfaq4?.or flush?)
You'll probably want to go look at this article:
http://www.perlmonth.com/articles//rtfm.html
which will tell you about perldoc and the other ways of
reading all the fine docs which come with every (proper)
Perl install. If you have ActiveState Perl, then you also
have an HTML tree of the docs which has a shortcut on your
Start menu for easy reference (if you prefer that way).
Given that, perlfaq4 is the 4th part of the extensive Perl
FAQ (Frequently Asked Questions). You'll usually find
in your life as a Perl beginner that you are not unique,
and many others have walked the same path.. asked the
same questions.. and been told RTFM!!! at high volume. :-)
But you can look in the FAQ (and search the questions
using 'perldoc -q your_keyword_here') and find the answers
in seconds, instead of having to let a bunch of Perlites
go out for coffee before deciding to answer your question..
by telling you to go read perlfaq4. :-)
Any (built-in) Perl function you don't know can be looked
up in the perlfunc page, or perused using
'perldoc -f function_name'. TomC thinks perldoc is an
engine of Satan, but you'll probably find it easier to use
than some unix-ish alternatives that you'll want to learn
about as you learn more and more about Perl.
> and...
> still same problem..:-(i have upploaded it ascii,permissions are
> set,i checked all white(empty)spaces before: End_of_prog,lines
> starting from left margin,
> and there is nothing else on line __EOF__,but still:
> [big snip of code]
I think that this is a problem with ActiveState Perl on win32
boxes. Put another hard return after that __EOF__ so
it isn't on the last line.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 26 May 1999 14:48:31 -0800
From: Abraham Grief <abey@cs.ucr.edu>
Subject: Re: Help, I'll pay money for solution!!!
Message-Id: <927758913.13347@www2.remarq.com>
Could you post the code of the script you have already?
It's hard to help otherwise.
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Wed, 26 May 1999 15:48:52 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: location of socket.pm
Message-Id: <374C7A54.78FF2756@mail.cor.epa.gov>
Dan Burke wrote:
>
> Where can I download the latest version of socket.pm ?
Surely you already have it on your system. But you'll
need to capitalize it correctly. Perl is sensitive about
that. Type this at your command prompt:
perldoc Socket
and you'll see that you have Socket.pm, and that there
is extensive documentation for it on your system.
Don't change it, unless your OS changes and you find that
the underlying constants have changed. And who would do
a bizarre thing like that? Well, other than Sun...
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 26 May 1999 22:55:36 GMT
From: NightLight@webcity.nl.NOSPAM!!!!!! (Jeroen Kustermans)
Subject: Module which enables you to program Internet Service Manager (IIS)
Message-Id: <374c7b3a.96357785@news.xs4all.nl>
Hi,
I want to create a virtual directory in IIS as well as in PWS.
Does anybody know if there is a specific module or a specific registry
setting for this type of job?
Thanks!
Jeroen
------------------------------
Date: Wed, 26 May 1999 22:03:29 GMT
From: mjz01@health.state.ny.us
Subject: Net::SSLeay and sending a cookie back to server
Message-Id: <7ihr3c$fgl$1@nnrp1.deja.com>
I writing a Perl script (Sun Solaris) to access our Web page using
Secure Socket Layer. All I want is to go to https://ourserver/ and
send a username/password to access our site and then bring up two web
pages (https://ourserver/page1 https://ourserver/page2) on our secure
site to make sure they are up and running.
I'm using Net::SSLeay (post or get https) to contact the https site,
which requires a user to enter a userid and password. The server then
sends back a cookie (Set-Cookie: somename=123456; path=/). This
cookie should be sent back to the server in all subsequent requests
made to the server, right? Well I try putting the cookie back in the
header (Cookie: somename=123456) with the requests (post or get https),
but get 403 InvalidId back from the server, instead of the page that
I'm requesting. Could anyone point me in the right direction. Sample
code would be useful!!
Thanks!
Michael Zanghi
mjz01@health.state.ny.us
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 26 May 1999 22:18:25 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: OO: Perl resources
Message-Id: <slrn7kp0co.5f.alastair@calliope.demon.co.uk>
Ryan Ngi <ryanngi@hotmail.com> wrote:
>where can i find the free OO: perl resources on internet?
>please suggest
If you're after references, try ;
http://reference.perl.com/
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Wed, 26 May 1999 22:07:55 GMT
From: dragons@dragons.duesouth.net (Matthew Bafford)
Subject: Re: Pattern Matching -- Up a Certain Creek with no Paddle
Message-Id: <slrn7kolke.j42.dragons@dragons.duesouth.net>
[major snippage follows -- you have been warned]
Tue, 25 May 1999 14:22:52 +100, Mug-O-Milk <webmaster@mugomilk.freeserve.co.uk>
held some poor sysadmin at gun point while typing in the following:
: for ($i=0; $i < @record; $i++) {
for ( @record ) {
: $record[$i] =~ s/\s{1,}/ /g;
tr/ //s;
: $record[$i] =~ s/^\s{1,}//;
s/^\s+//;
: $record[$i] =~ s/\s{1,}$//;
s/\s+$//;
: }
: if ($record[$sel] =~ /$word/i) {
/^$word$/io
: $matches = @results + 0; # CONVERT TO A NUMBER (weird I know!)
$matches = @results;
: Any help whatsoever would be appreciated!
HTH,
: Thanks in Advance!
--Matthew
--
: --
Without the space on the end it doesn't quite work.
------------------------------
Date: Wed, 26 May 1999 15:25:41 -0700
From: Greg McCann <gregm@well.com>
Subject: Re: Perl compiler...If or when
Message-Id: <374C74E5.20B51CE5@well.com>
Eli the Bearded wrote:
>
> In comp.lang.perl.misc, Ala Qumsieh <aqumsieh@matrox.com> wrote:
> > > perl is not yet a universal language, and I have people at
> > > work who have not installed perl on their PC's because
> > > its too much work. We have no system administrator.
> > Installing Perl is too much work? Who told you so? On Winblows, it is
> > completely automated, and takes around 15 minutes. On *nix, it's
>
> The ActiveState installer for Windows95 crashed during the install
> for me. I wanted to run the test suite after that, but apparently it
> was not installed (grumble, MacPerl has it, so there is at least
> one binary distribution precedent). It passed 'Hello World' and it
> runs a socket program that was the reason I installed it. Not an
> install I've a lot of confidence in, however.
I'll second that. I installed Perl from the CD-ROM that came with the Win32
Perl Resource Kit. The perl interpreter works fine, but perldoc is
brain-damaged.
C:\>perldoc
Usage: !Script ...
C:\>perldoc perldoc
C:\>
C:\>perldoc -f fork
Can't start filter at !Script line 403, <PFUNC> chunk 1404.
Greg
--
======================
Gregory McCann
http://www.calypteanna.com
"Be kind, for everyone you meet is fighting a great battle." Saint Philo of
Alexandria
------------------------------
Date: Wed, 26 May 1999 23:14:45 +0000
From: helee@globalnet.co.uk (Lee & Helen)
Subject: Perl for beginners
Message-Id: <helee-2605992314450001@p51s08a06.client.global.net.uk>
Hello all
Sorry to be a nuisence but does anyone know a good newsgroup or mailing
list for beginners in Perl
I am just learning this wonderful but sometimes confusing language by book
and would love for someone to answer my questions.
The problem is I ask too many questions so I need someone patient.
Thanks in advance
Id prefer you to email me with your comments as well as post them here
Lee
------------------------------
Date: Wed, 26 May 1999 23:01:26 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Perl for beginners
Message-Id: <7ihstt$fdg$1@oak.prod.itd.earthlink.net>
[ courtesy cc sent by mail if address not munged ]
helee@globalnet.co.uk (Lee & Helen) wrote:
>Sorry to be a nuisence but does anyone know a good newsgroup or mailing
>list for beginners in Perl
This is the newsgroup for beginners as well as experts.
>I am just learning this wonderful but sometimes confusing language by book
>and would love for someone to answer my questions.
Perhaps you have the wrong book. Even if the books is bad, you can
always consult the documentation that came with your perl distribution.
And then if you still can't find the answer you need, ask here using a
clear subject line and in the body of your article be sure to include
the snippet of your code that is not acting as you wish it to, a clear
description of the desired results and the results you are getting.
>The problem is I ask too many questions so I need someone patient.
There are way too many questions answered in the FAQs, that sounds like
a perfect place for you to start.
>Thanks in advance
>
>Id prefer you to email me with your comments as well as post them here
Not a problem, you didn't munge your e-mail address.
HTH
------------------------------
Date: Wed, 26 May 1999 22:43:33 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Perl for beginners
Message-Id: <slrn7kp1rt.5f.alastair@calliope.demon.co.uk>
Lee & Helen <helee@globalnet.co.uk> wrote:
>Hello all
>
>Sorry to be a nuisence but does anyone know a good newsgroup or mailing
>list for beginners in Perl
>
>I am just learning this wonderful but sometimes confusing language by book
>and would love for someone to answer my questions.
I'm not aware of a specific newsgroup for beginners, so you're stuck here I'm
afraid. My advice would be to take the learning steadily and, if you get stuck
on something specific, ask. Make sure you check the docs and try things out
first on your own though. Perl docs should be installed as part of your
distribution (see the FAQ's especially).
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Wed, 26 May 1999 21:49:35 GMT
From: John Porter <jdporter@min.net>
Subject: Re: perl syntax error
Message-Id: <7ihq9a$evn$1@nnrp1.deja.com>
In article <374C5A15.64D784B5@bluecloud.com>,
jahn@bluecloud.com wrote:
>
> I moved a CGI script I wrote in Perl from another server to my
personal
> account and when I did a 'perl -c filename' on it, I got syntax errors
on this line:
> HERE --> push @theArray, [ split /,/ ];
> This is the error msg:
> syntax error in file sun_sign.cgi at line 53, next 2 tokens "push
@theArray"
The problem is that you have taken a huge leap backwards in the
version of perl you're running. Looks to me like you've got Perl 4!
Time to upgrade, for sure.
--
John Porter
Put it on a plate, son. You'll enjoy it more.
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 26 May 1999 22:43:03 GMT
From: Howard Jow <ppith@my-deja.com>
Subject: perldoc -f alarm
Message-Id: <7ihtdn$h9v$1@nnrp1.deja.com>
Okay, so I did this and read the description and sample code they
provided. Here's a small program I wrote to try and test it:
eval {
$timeout = 10;
local $SIG{ALRM} = sub { die "alarm\n" };
alarm $timeout;
system("bomb.pl"); # takes forever to run
# system("ls");
alarm 0;
};
die if $@ && $@ ne "alarm\n"; # propagate errors
if ($@) {
# timed out
print "we died cuz the program took too long!\n";
}
else {
# didn't
print "we made it...\n";
}
If I run it with bomb.pl (another Perl program that loops infinitely),
it will end after about ten seconds and print "we died...". If I run
it with "ls" it will print "we made it...". However, when the program
is done running, bomb.pl is still running as a system process under
my name. Now, here's a not so elegant solution I thought of:
(surely there must be a better solution? I'm not calling you Shirley)
1. ps -A (all unix boxes are different, I'm used to aux, anyways) and
grep out (filter out, parse out, etc) bomb.pl
2. Use perl reg exps to find the PID
3. Use a system("kill -i $pid"); to take care of it.
This is probably not the best way to do it...is there a more elegant
solution? Let me know...thanks!
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 26 May 1999 14:53:51 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Q: Truncate a string
Message-Id: <MPG.11b60d4644a87600989b07@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <Pine.SOL.3.96.990526144657.8734A-100000@ux9.cso.uiuc.edu> on
Wed, 26 May 1999 14:50:02 -0500, milan andric <m-andric@uiuc.edu>
says...
> i'm trying to print only the first 8 letters of a string.. and i'm not
> sure what to use. perl has a function called truncate, but that doesn't
> seem to work for strings and character truncation. is the answer
> somewhere in the deep world of regular expressions?
That's one way, but not the best.
perldoc -f substr
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 26 May 1999 15:41:41 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Q: Truncate a string
Message-Id: <374C78A5.E11DDBF4@mail.cor.epa.gov>
milan andric wrote:
>
> i'm trying to print only the first 8 letters of a string.. and i'm not
> sure what to use. perl has a function called truncate, but that doesn't
> seem to work for strings and character truncation.
Correct. truncate() works on files.
> is the answer
> somewhere in the deep world of regular expressions?
*An* answer is in the deep world of regexen. But a better
answer is to use the function substr().
perldoc -f substr
should tell you what you want to know.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 26 May 1999 15:10:06 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: removings " "s from strings
Message-Id: <374C713E.E9755C27@mail.cor.epa.gov>
Tom Christiansen wrote:
>
> [courtesy cc of this posting mailed to cited author]
>
> In comp.lang.perl.misc,
> David Cassell <cassell@mail.cor.epa.gov> writes:
> :accurate than "Perl for Dummies who Can't Recognize a Ripoff".
>
> Mistake #0: Perl is *not*for*dummies*!
Agreed. Strongly. But if I were to write a book for dummies
(a la Dogbert), I could write *anything* about the subject.
Who would be reading the book and would ever have the
competency to catch me? [Aside from conscientious reviewers
I couldn't buy off, of course.] Does that seem too different
from what was actually done?
> :The HTML docs have the complete Perl FAQ,
>
> As does what I just ANNOUNCEd.
As I noticed earlier. But I didn't think that was yet
within the reach of the poster. After all, he has
whatever the 'Dummies' think is Perl on his machine.
Well, I'm sure it's *some* four-letter word. :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 26 May 1999 15:11:12 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: removings " "s from strings
Message-Id: <374C7180.AE7BBFD8@mail.cor.epa.gov>
Dick Latshaw wrote:
>
> In article <374C3C52.7D842817@mail.cor.epa.gov>,
> David Cassell <cassell@mail.cor.epa.gov> wrote:
> > {the usual drivel}
> > [3] unzip it with something like WinZip [which is also free]
>
> Even easier than that - it's a self extracting exe, so he can skip step
> 3.
Oops. I forgot. Mea culpa.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 26 May 1999 15:16:12 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: s/// multiple lines in file from cmd line
Message-Id: <374C72AC.6CFF273C@mail.cor.epa.gov>
Otis Gospodnetic wrote:
>
> [snipperoonie]
> The first suggestion worked nicely (how/where does one learn about that
> -0777 thing??)
perlrun [along with all the other command-line switches]
> As for this suggesiton - what is the limit on the file size for
> slurping? :)
How much virtual memory do you have?
But if your file is so large that this impacts your system's
performance, and you need to do often, there are less 'hungry'
approaches.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 26 May 1999 22:23:25 GMT
From: Otis Gospodnetic <otis@my-deja.com>
Subject: Re: s/// multiple lines in file from cmd line
Message-Id: <7ihs8l$ged$1@nnrp1.deja.com>
In article <374c45f3@cs.colorado.edu>,
tchrist@mox.perl.com (Tom Christiansen) wrote:
> [courtesy cc of this posting mailed to cited author]
>
> In comp.lang.perl.misc,
> Otis Gospodnetic <otis@my-deja.com> writes:
> :As for this suggesiton - what is the limit on the file size for
> :slurping? :)
>
> What is the limit of your virtual memory? Check your swap space.
Ah, this is like that TV show....quiz... Jeopardy.
Answering a question with a question :)
I never understood why they do that.
Got it, thanks!
Otis
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 26 May 1999 22:26:10 GMT
From: "Sheila Eugenio" <seugenio@man.amis.com>
Subject: unexponentialize field from text file
Message-Id: <01bea74f$36a5c0c0$2bbe10ac@amipnet>
I would really appreciate any help. I have a tab file with a field in
exponential form. I was wondering how I can convert this to a floating
point number in normal notation through regexp. thanks.
0.20161E-01 to 0.020161
0.49279E-02 to 0.004928
------------------------------
Date: 26 May 1999 21:53:29 GMT
From: jfeuerst@allegro.cs.tufts.edu (Jozxyqk)
Subject: Re: using ~ with chdir
Message-Id: <7ihqgp$utm$1@news3.tufts.edu>
-> I'd like to be able to do chdir("~username/path/to/dir"), but perl
-> doesn't seem to like this.
If this is being run by "username", you can check $ENV{HOME} to find out
where their home directory is.
Otherwise, I suppose you could just parse /etc/passwd to find their home
directories..
There may be another way, I'm a relative newbie to Perl myself.
--
Josh "Jozxyqk" Feuerstein
jfeuerst@eecs.tufts.edu || joshf@quickbuy.com
"We cannot choose what we are - yet what are we, but the sum of our choices?"
-- Rob Grant, Bac>\wards
------------------------------
Date: 26 May 1999 22:36:02 GMT
From: Steven Fatine <sfatine@doe.carleton.ca>
Subject: variables and arrays
Message-Id: <7iht0i$27q$1@mercury.cc.uottawa.ca>
--
+------------------------------------+
| |
| Steven Fatine |
| sfatine@site.uottawa.ca |
| Dept. of Electrical Engineering |
| o__ o__ o__ o__ o__ |
| ,>/'_ ,>/'_ ,>/'_ ,>/'_ ,>/'_ |
+-(_)\(_)(_)\(_)(_)\(_)(_)\(_)(_)\(_)+
------------------------------
Date: 26 May 1999 16:09:17 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: workarounds for prototypes
Message-Id: <374c710d@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
therzog@knotech.com (Tim Herzog) writes:
:Coming from C/C++ backgrounds, I'm used to functions being prototyped and
:I like it that way.
Oh good. Please write me prototypes for the following:
a function that takes an even number of arguments, so I
can use these as key-value pairs in a hash.
as before, but further stipulating that the keys must be numeric
strings and the values must be references to unblessed hashes
a function that takes a filehandle open for writing
a function that takes one numeric and one string argument
a function that takes a Foo object and a Bar object as
its two arguments
a function that returns nothing, or one that returns one
thing, or one that returns many things
a function that returns a Foo object
a function that takes either an array reference or a
hash reference as its argument
a function that expects a single scalar argument, and
raises a compiler error if passed an array instead
a function that takes a prime number of arguments
--tom
--
"That's okay. Anyone whose opinion he cares about already knows that
he doesn't care about their opinion."
--Larry Wall
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 5795
**************************************