[16133] in Perl-Users-Digest
Perl-Users Digest, Issue: 3545 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 10 14:52:31 2000
Date: Mon, 10 Jul 2000 11:52:04 -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: <963255123-v9-i3545@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 10 Jul 2000 Volume: 9 Number: 3545
Today's topics:
"module" method missing in mod_perl Apache.pm? <jduell@alumni.princeton.edu.nohamspamwich>
Re: $$$$$ username <lr@hpl.hp.com>
Re: $$$$$ username <gellyfish@gellyfish.com>
Re: $$$$$ username <russ_jones@rac.ray.com>
Re: $_ and @_ use? (Abigail)
Re: $_ and @_ use? (Bart Lateur)
Re: $_ and @_ use? (Abigail)
Re: $_ and @_ use? <uri@sysarch.com>
%SIG and timers tony_barratt@my-deja.com
Re: %SIG and timers (Clinton A. Pierce)
Re: %SIG and timers tony_barratt@my-deja.com
Re: %SIG and timers (Clinton A. Pierce)
.: DevCritic.com Launched! :. <damonNOdaSPAM@unispace.com.invalid>
.pm vs .pl? <marc@netcontinuum.com>
Re: .pm vs .pl? <lmaxwell_nospam@logicon.com>
Re: .pm vs .pl? <lauren_smith13@hotmail.com>
Re: .pm vs .pl? (David Efflandt)
Re: .pm vs .pl? (Rafael Garcia-Suarez)
Re: .pm vs .pl? (Rasputin)
Re: .pm vs .pl? (Bart Lateur)
Re: .pm vs .pl? <rosie@dozyrosy.plus.com>
<newbie> trying to send multiple emails from FormMail <bschaettle@olmmed.org>
<newbie>How to determine current location (pwd) in CGI <colinrei@oz.net>
Re: <newbie>How to determine current location (pwd) in (Helgi Briem)
Re: <newbie>How to determine current location (pwd) in turnere0@my-deja.com
Re: <newbie>How to determine current location (pwd) in <flavell@mail.cern.ch>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 10 Jul 2000 11:55:16 GMT
From: Jason Duell <jduell@alumni.princeton.edu.nohamspamwich>
Subject: "module" method missing in mod_perl Apache.pm?
Message-Id: <3969C0BA.CA0683B9@alumni.princeton.edu.nohamspamwich>
I'm trying to get Apache::DBI working on a RedHat box, and I'm running
into the following problem:
Apache::DBI.pm refers to "Apache->module()" in Apache.pm, yet Apache.pm
(which ships with mod_perl) has no such method.
I'm currently trying to install with mod_perl-1.24 and ApacheDBI-0.87,
but I've also gone back and looked at older versions of both, and as far
back as CPAN's got, there seems to be this missing function.
And yet I know there must be at least a couple folks out there running
Apache::DBI...
Anyone have any idea what's wrong? I've seen posts about this from folks
running Debian, too, but never a reply
with a solution.
Thanks,
Jason Duell
------------------------------
Date: Tue, 4 Jul 2000 22:22:22 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: $$$$$ username
Message-Id: <MPG.13cc65e172cde32c98aba6@nntp.hpl.hp.com>
In article <8jhngs$gtc$1@orpheus.gellyfish.com>, gellyfish@gellyfish.com
says...
...
> As Larry Rosler appears to have been kidnapped by aliens ...
... who now have given me access to a computer, and 2500 messages in
this NG alone, to help me waste the Glorious (for us in the US) Fourth.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 6 Jul 2000 00:03:49 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: $$$$$ username
Message-Id: <8k0esl$7ik$1@orpheus.gellyfish.com>
On Tue, 4 Jul 2000 22:22:22 -0700 Larry Rosler wrote:
> In article <8jhngs$gtc$1@orpheus.gellyfish.com>, gellyfish@gellyfish.com
> says...
>
> ...
>
>> As Larry Rosler appears to have been kidnapped by aliens ...
>
> ... who now have given me access to a computer, and 2500 messages in
> this NG alone, to help me waste the Glorious (for us in the US) Fourth.
>
Laz, Laz ... Hows the blue goo they are feeding you ... ;-}
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: Thu, 06 Jul 2000 10:17:31 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: $$$$$ username
Message-Id: <3964A30B.3710F63E@rac.ray.com>
Jonathan Stowe wrote:
>
> On Tue, 4 Jul 2000 22:22:22 -0700 Larry Rosler wrote:
> > gellyfish@gellyfish.com says...
> >> As Larry Rosler appears to have been kidnapped by aliens ...
> >
> > ... who now have given me access to a computer, and 2500 messages in
> > this NG alone, to help me waste the Glorious (for us in the US) Fourth.
> >
> Laz, Laz ... Hows the blue goo they are feeding you ... ;-}
>
The heck with that, what about those probes?
--
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: 05 Jul 2000 11:44:23 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: $_ and @_ use?
Message-Id: <slrn8m6n0c.ibb.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCDXCV September MCMXCIII
in <URL:news:395f718d.3258645@news.skynet.be>:
--
-- shift() behaves differently in a sub, than in top level code: at the top
-- level, shift defaults to using @ARGV, the command line arguments (usuall
-- file names), while in a sub, it uses @_, the sub parameters array.
--
-- @_ used to be used as a target for split(), when not called in a list
-- context, but that is deprecated. Otherwise, there are NO functions that
-- default to using it.
pop, push, and unshift use @_ outside of the main program by default
as well.
And then there's &func;.
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
------------------------------
Date: Wed, 05 Jul 2000 19:30:29 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: $_ and @_ use?
Message-Id: <39638c19.1088888@news.skynet.be>
Abigail wrote:
>pop, push, and unshift use @_ outside of the main program by default
>as well.
You're right about pop. As a counterpart to shift, it makes sense. In
all these years, I have never used it. But for push and unshift, I can't
imagine how it could be possible.
perlfunc doesn't mention it either.
--
Bart.
------------------------------
Date: 05 Jul 2000 15:49:45 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: $_ and @_ use?
Message-Id: <slrn8m75ce.ibb.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMD September MCMXCIII in
<URL:news:39638c19.1088888@news.skynet.be>:
?? Abigail wrote:
??
?? >pop, push, and unshift use @_ outside of the main program by default
?? >as well.
??
?? You're right about pop. As a counterpart to shift, it makes sense. In
?? all these years, I have never used it. But for push and unshift, I can't
?? imagine how it could be possible.
You're right. push and unshift don't use @_ by default.
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
------------------------------
Date: Wed, 05 Jul 2000 20:55:26 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: $_ and @_ use?
Message-Id: <x7k8f0qouc.fsf@home.sysarch.com>
>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:
BL> Abigail wrote:
>> pop, push, and unshift use @_ outside of the main program by default
>> as well.
BL> You're right about pop. As a counterpart to shift, it makes sense. In
BL> all these years, I have never used it.
pop makes for a good perl golf trick to get the solo arg from @_. or in
weirder cases (usually golf too) to get the last element of @_.
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
------------------------------
Date: Tue, 04 Jul 2000 14:27:35 GMT
From: tony_barratt@my-deja.com
Subject: %SIG and timers
Message-Id: <8jss87$f4t$1@nnrp1.deja.com>
Hi,
I'm trying to build as timer like so:
#!/usr/local/bin/perl -w
$count =0;
mitimer();
sub mitimer{
while (1){
if ($count > 5){
print "count = $count\n";
}
$count++;
sleep(1);
}
}
$SIG{USR1} = sub { $count =0; mitimer() };
# ./timmer
count = 6
count = 7
count = 8
count = 9
count = 10
User Signal 1
<that's it, no more output after I hit the process with a kill -USR1>
Well I don't quite know what I'm doin, do I? <sigh>
But what I want to do is to reset the timer, ie set $count = 0, when a
USR1 signal is received. I gotta be close haven't i?
TIA
Tony
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 04 Jul 2000 17:04:19 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: %SIG and timers
Message-Id: <nOo85.24040$fR2.216863@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <8jss87$f4t$1@nnrp1.deja.com>,
tony_barratt@my-deja.com writes:
> <that's it, no more output after I hit the process with a kill -USR1>
>
> Well I don't quite know what I'm doin, do I? <sigh>
> But what I want to do is to reset the timer, ie set $count = 0, when a
> USR1 signal is received. I gotta be close haven't i?
You're a little off the mark. What you want to do is have a timer
going, and reset it when sigusr1 is received? Now the question I have
is...are you going to be busy-waiting like this or do you want the
process to go to sleep?
If you've got other processing going on, just use a pair of
signal handlers, like this: (untested)
#!/usr/bin/perl -w
use strict;
my $expired=0;
my $duration=10; # How long we want the timer for..
$SIG{ALRM}=sub { $expired=1; };
sub more_time {
$SIG{USR1}=\&more_time;
alarm($duration);
}
$SIG{USR1}=\&more_time;
alarm($duration);
while(work_not_done) {
#
# Your processing here
#
if ($expired) {
#....timer has gone off!
last;
}
}
This keeps the while loop going until the timer goes off. If you
send the process SIGUSR1, then you get another 10 seconds on the
timer.
Do **NOT** use sleep() or anything like that in the while() loop.
It'll destroy your alarm() timer. If you just need to wait around
and not process anything, well, that's yet another (and completely
different) design.
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Wed, 05 Jul 2000 12:51:03 GMT
From: tony_barratt@my-deja.com
Subject: Re: %SIG and timers
Message-Id: <8jvavh$51d$1@nnrp1.deja.com>
In article <nOo85.24040$fR2.216863@news1.rdc1.mi.home.com>,
clintp@geeksalad.org (Clinton A. Pierce) wrote:
> [Posted and mailed]
>
> In article <8jss87$f4t$1@nnrp1.deja.com>,
> tony_barratt@my-deja.com writes:
> > <that's it, no more output after I hit the process with a kill -
USR1>
> >
> > Well I don't quite know what I'm doin, do I? <sigh>
> > But what I want to do is to reset the timer, ie set $count = 0,
when a
> > USR1 signal is received. I gotta be close haven't i?
>
> You're a little off the mark. What you want to do is have a timer
> going, and reset it when sigusr1 is received? Now the question I have
> is...are you going to be busy-waiting like this or do you want the
> process to go to sleep?
>
> If you've got other processing going on, just use a pair of
> signal handlers, like this: (untested)
>
> #!/usr/bin/perl -w
>
> use strict;
>
> my $expired=0;
> my $duration=10; # How long we want the timer for..
>
> $SIG{ALRM}=sub { $expired=1; };
> sub more_time {
> $SIG{USR1}=\&more_time;
> alarm($duration);
>
> }
> $SIG{USR1}=\&more_time;
>
> alarm($duration);
>
> while(work_not_done) {
> #
> # Your processing here
> #
> if ($expired) {
> #....timer has gone off!
> last;
> }
>
> }
>
> This keeps the while loop going until the timer goes off. If you
> send the process SIGUSR1, then you get another 10 seconds on the
> timer.
>
> Do **NOT** use sleep() or anything like that in the while() loop.
> It'll destroy your alarm() timer. If you just need to wait around
> and not process anything, well, that's yet another (and completely
> different) design.
>
> --
> Clinton A. Pierce Teach Yourself Perl in 24 Hours!
> clintp@geeksalad.org for details see
http://www.geeksalad.org
> "If you rush a Miracle Man,
> you get rotten Miracles." --Miracle Max, The Princess Bride
>
Well that looks neat and extra plausible. Ta muchly.
What I want to do is generate an event(actually a call to "logger" to
create a syslog msg) if the timer is not reset by a USR1 signal before
it times out. So your proposal, with a busy wait will work fine.
Will this chew up lots of CPU though?
Regards
Tony
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 05 Jul 2000 21:17:34 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: %SIG and timers
Message-Id: <OBN85.25099$fR2.228000@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <8jvavh$51d$1@nnrp1.deja.com>,
tony_barratt@my-deja.com writes:
> In article <nOo85.24040$fR2.216863@news1.rdc1.mi.home.com>,
>>
>> If you just need to wait around
>> and not process anything, well, that's yet another (and completely
>> different) design.
>>
> Well that looks neat and extra plausible. Ta muchly.
> What I want to do is generate an event(actually a call to "logger" to
> create a syslog msg) if the timer is not reset by a USR1 signal before
> it times out. So your proposal, with a busy wait will work fine.
> Will this chew up lots of CPU though?
Yucky. If you're just WAITING, then that's another design altogether.
Please no busy waiting. (untested):
use strict;
my $expired;
my $duration=10; # How long we want the timer for..
sub more_time {
$SIG{USR1}=\&more_time;
$expired=1;
}
$SIG{USR1}=\&more_time;
do {
$expired=0;
sleep($duration);
} while ($expired);
# Your code here....
So on its face, it looks like the do/while loop will only run once,
but it won't because the handler will reset $expired if USR1 is
received. Hardly any CPU is used because most of the time we're
sleeping.
Put the code that you want to happen if the saving throw isn't good
after the "Your code here".
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Thu, 06 Jul 2000 00:08:06 -0700
From: damonr <damonNOdaSPAM@unispace.com.invalid>
Subject: .: DevCritic.com Launched! :.
Message-Id: <00592370.ebec4146@usw-ex0101-005.remarq.com>
Hello all,
I just wanted to bring to your attention the fact that
http://www.devcritic.com was officially launched today and I
just want you to go there, browse around, play with it, download
scripts, read tutorials...do whatever and give me
suggestions...give me comments...I want the site to be
perfect. :)
Thanks in advance,
Damon Ramsey
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Thu, 06 Jul 2000 13:58:19 -0700
From: Marc Holder <marc@netcontinuum.com>
Subject: .pm vs .pl?
Message-Id: <3964F2EB.7A346FBA@netcontinuum.com>
Does anybody know what the diffrence between .pl and .pm files are?
------------------------------
Date: Thu, 6 Jul 2000 16:17:42 -0500
From: "Lane Maxwell" <lmaxwell_nospam@logicon.com>
Subject: Re: .pm vs .pl?
Message-Id: <8k2t8c$a3447@phoenix.corp.logicon.com>
Well, that depends on their contents. Normally .pl files are some type of
Perl script and .pm files are Perl Modules.
Lane
"Marc Holder" <marc@netcontinuum.com> wrote in message
news:3964F2EB.7A346FBA@netcontinuum.com...
> Does anybody know what the diffrence between .pl and .pm files are?
>
------------------------------
Date: Thu, 6 Jul 2000 14:49:45 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: .pm vs .pl?
Message-Id: <8k2uvr$7bb$1@brokaw.wa.com>
Marc Holder <marc@netcontinuum.com> wrote in message
news:3964F2EB.7A346FBA@netcontinuum.com...
> Does anybody know what the diffrence between .pl and .pm files are?
>
One bit.
;-)
Rule of thumb that may fall apart under extreme scrutiny, but is handy in
most cases:
.pl files are the Perl programs that you write and run.
.pm files are the Perl module libraries that support your programs.
Be aware that this is not always the case and that the filename extension is
not intrinsically tied to the type of file that it may actually be. (e.g.
'perl myperlprogram.goo' will compile and execute the contents of
myperlprogram.goo)
Lauren
------------------------------
Date: 7 Jul 2000 04:06:27 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: .pm vs .pl?
Message-Id: <slrn8malpt.le7.efflandt@efflandt.xnet.com>
On Thu, 06 Jul 2000 13:58:19 -0700, Marc Holder <marc@netcontinuum.com> wrote:
>Does anybody know what the diffrence between .pl and .pm files are?
It only really matters if you use an OS that uses filename extension
instead of file contents to associate the interpretter with the file.
When Perl5 first came out I was under the mistaken impression that .pl was
perl4 and .pm was Perl5 scripts, but that was my mistake. The .pm is
typically for Perl5 modules and .pl is just for indicating that a source
script is a Perl script. But in actual use, you can rename or symlink a
script without any extension on Unix systems and run it like a command (if
it is in your PATH).
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: Fri, 07 Jul 2000 07:16:58 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: .pm vs .pl?
Message-Id: <slrn8mb17p.b7v.rgarciasuarez@rafael.kazibao.net>
David Efflandt wrote in comp.lang.perl.misc:
>On Thu, 06 Jul 2000 13:58:19 -0700, Marc Holder <marc@netcontinuum.com> wrote:
>>Does anybody know what the diffrence between .pl and .pm files are?
>
>It only really matters if you use an OS that uses filename extension
>instead of file contents to associate the interpretter with the file.
>
>When Perl5 first came out I was under the mistaken impression that .pl was
>perl4 and .pm was Perl5 scripts, but that was my mistake. The .pm is
>typically for Perl5 modules and .pl is just for indicating that a source
>script is a Perl script. But in actual use, you can rename or symlink a
>script without any extension on Unix systems and run it like a command (if
>it is in your PATH).
Well, the .pm (Perl Module) extension is actually used by the
'require Foo::Bar' and 'use Foo::Bar' directives.
The .pl extension used to refer to Perl Librairies, before the module
mechanism came into light: i.e., a bunch of subroutines declared in some
.pl file, require'd by some script. Some of them are still lurking into
your perl module directories, for the sake of Backward Compatibility.
--
Rafael Garcia-Suarez
------------------------------
Date: Fri, 07 Jul 2000 12:13:40 GMT
From: rara.rasputin@nospam.virgin.net (Rasputin)
Subject: Re: .pm vs .pl?
Message-Id: <slrn8mbi9o.rt8.rara.rasputin@cartman.techsupport.co.uk>
efflandt@xnet.com <David Efflandt> wrote:
>On Thu, 06 Jul 2000 13:58:19 -0700, Marc Holder <marc@netcontinuum.com> wrote:
>>Does anybody know what the diffrence between .pl and .pm files are?
<snip>
>perl4 and .pm was Perl5 scripts, but that was my mistake. The .pm is
>typically for Perl5 modules and .pl is just for indicating that a source
>script is a Perl script. But in actual use, you can rename or symlink a
>script without any extension on Unix systems and run it like a command (if
>it is in your PATH).
>
It's also worth remembering that webservers may be configured to
recognize CGI scripts by the .pl extension, and treat them differently
to files without an extension.
--
Rasputin.
Jack of All Trades - Master of Nuns.
------------------------------
Date: Fri, 07 Jul 2000 12:14:48 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: .pm vs .pl?
Message-Id: <3966c917.1994876@news.skynet.be>
Marc Holder wrote:
>Does anybody know what the diffrence between .pl and .pm files are?
Perl doesn't really care about file name extensions. With just one
exception: if you specify
require Foo::Bar;
then perl will automatically search for "Foo/Bar.pm" in the paths in
@INC. So if you use ".pm", you may have a slightly easier life. If you
stick to the old (Perl4) ".pl" extension for library files, you'll have
to specify the full name.
require "Foo/Bar.pl";
--
Bart.
------------------------------
Date: Sat, 8 Jul 2000 21:31:21 +0100
From: Rosemary I H Powell <rosie@dozyrosy.plus.com>
Subject: Re: .pm vs .pl?
Message-Id: <MPG.13d117516d288da2989683@usenet.plus.net>
In article <slrn8mbi9o.rt8.rara.rasputin@cartman.techsupport.co.uk> dated
Fri, 07 Jul 2000 12:13:40 GMT, our revered colleague Rasputin
(rara.rasputin@nospam.virgin.net) was so kind as to advise ...
> efflandt@xnet.com <David Efflandt> wrote:
> >On Thu, 06 Jul 2000 13:58:19 -0700, Marc Holder <marc@netcontinuum.com> wrote:
> >>Does anybody know what the diffrence between .pl and .pm files are?
>
> <snip>
>
> >perl4 and .pm was Perl5 scripts, but that was my mistake. The .pm is
> >typically for Perl5 modules and .pl is just for indicating that a source
> >script is a Perl script. But in actual use, you can rename or symlink a
> >script without any extension on Unix systems and run it like a command (if
> >it is in your PATH).
> >
>
> It's also worth remembering that webservers may be configured to
> recognize CGI scripts by the .pl extension, and treat them differently
> to files without an extension.
Or even by .cgi extensions in some cases.
Rosemary
--
----------------------------------------------------------------
| Rosemary I.H.Powell EMail: Home: rosie@dozyrosy.plus.com |
| Work: r.i.h.powell@rl.ac.uk |
| http://NeedleworkSamplers.com/ |
| http://www.cybercelebrations.com/ |
| http://CavalierKingCharles.com/ |
----------------------------------------------------------------
------------------------------
Date: Wed, 5 Jul 2000 12:34:03 -0500
From: "Bob Schaettle" <bschaettle@olmmed.org>
Subject: <newbie> trying to send multiple emails from FormMail
Message-Id: <76M85.199$vG4.126932@news.uswest.net>
I'm new to perl, so please, no rude comments about my using FormMail...
I'm trying to to send a 2nd msg from the send_mail sub. Following the
"close (MAIL);" command, I do another open (MAIL,"|$mailprog -t") and try
to generate the second message, but the script crashes (the first msg does
get sent, however).
To see if this was being caused by some restriction on my server, I wrote a
very stripped-down script to see if I can send 2 msgs using this technique,
and that works just fine.
Any ideas?
------------------------------
Date: 5 Jul 2000 04:55:34 GMT
From: "Colin Reinhardt" <colinrei@oz.net>
Subject: <newbie>How to determine current location (pwd) in CGI script?</newbie>
Message-Id: <8juf46$4o5$0@216.39.148.120>
I need to dynamically set a path for a Location: redirect in my Perl script.
I'd like to do something like this...
print "Location: ", get_current_path(), "/index2.html\n\n";
Any tips on how to implement get_current_path( ) easily?
Like I said, I'm a total Perl newbie with a deadline (a very scary
thing...your worst nightmare?)
Thanks!
Colin
------------------------------
Date: Wed, 05 Jul 2000 14:32:18 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: <newbie>How to determine current location (pwd) in CGI script?</newbie>
Message-Id: <39634692.1385362445@news.itn.is>
On 5 Jul 2000 04:55:34 GMT, "Colin Reinhardt"
<colinrei@oz.net> wrote:
>I need to dynamically set a path for a Location: redirect in my Perl script.
>
>I'd like to do something like this...
>
>print "Location: ", get_current_path(), "/index2.html\n\n";
>
>Any tips on how to implement get_current_path( ) easily?
>
>Like I said, I'm a total Perl newbie with a deadline (a very scary
>thing...your worst nightmare?)
>
use Cwd;
my $current_path = cwd;
------------------------------
Date: Wed, 05 Jul 2000 15:09:05 GMT
From: turnere0@my-deja.com
Subject: Re: <newbie>How to determine current location (pwd) in CGI script?</newbie>
Message-Id: <8jvj21$b53$1@nnrp1.deja.com>
In article <8juf46$4o5$0@216.39.148.120>,
"Colin Reinhardt" <colinrei@oz.net> wrote:
> I need to dynamically set a path for a Location: redirect in my Perl
script.
>
> I'd like to do something like this...
>
> print "Location: ", get_current_path(), "/index2.html\n\n";
>
> Any tips on how to implement get_current_path( ) easily?
>
> Like I said, I'm a total Perl newbie with a deadline (a very scary
> thing...your worst nightmare?)
>
> Thanks!
>
> Colin
>
>
perldoc Cwd
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 5 Jul 2000 16:45:35 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: <newbie>How to determine current location (pwd) in CGI script?</newbie>
Message-Id: <Pine.GHP.4.21.0007051644240.10709-100000@hpplus03.cern.ch>
On Wed, 5 Jul 2000, Helgi Briem wrote:
> >print "Location: ", get_current_path(), "/index2.html\n\n";
> use Cwd;
> my $current_path = cwd;
Another good reason for avoiding off-topic postings.
--
"Mir ist es ein Rätsel wie man mit minimalem Verstand so einen
Unfug fabrizieren kann." - Adrian Knoth
------------------------------
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 3545
**************************************