[16283] in Perl-Users-Digest
Perl-Users Digest, Issue: 3695 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 17 18:06:20 2000
Date: Mon, 17 Jul 2000 15:05:25 -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: <963871525-v9-i3695@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 17 Jul 2000 Volume: 9 Number: 3695
Today's topics:
Re: "Perl Bowling" revisited with an array question (Abigail)
Re: "Perl Bowling" revisited with an array question (Abigail)
Re: [NEW-B] What's wrong with this script? <lr@hpl.hp.com>
Attatchments from client cpoole@muskegon.k12.mi.us
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <care227@attglobal.net>
B::Lint usage <dlwhite@csua.berkeley.edu>
B::Lint usage <david@uclink.berkeley.edu>
Re: Beginer with question on simple perl/cgi form (Abigail)
Re: Best solution for this? ([ Dr. Jeff ])
Re: Best solution for this? <harryworld@home.com>
Re: Best solution for this? <roll@night.com>
Re: Bizarre BEGIN block problem (Abigail)
Re: Checking the size of an E-mail... <jbroz@yperite.demon.co.uk>
Re: Computing date + xxx days (jason)
context confusion <dem@achilles.net>
Re: context confusion (Eric Bohlman)
Re: context confusion <juex@deja.com>
Re: context confusion <dem@achilles.net>
Re: context confusion <sumus@aut.dk>
date in YYYYMMDDHH24MISS format rrubin@rotor.net
Re: date in YYYYMMDDHH24MISS format <tony_curtis32@yahoo.com>
Re: date in YYYYMMDDHH24MISS format <lauren_smith13@hotmail.com>
Re: Did I FLOCK this correctly? <lr@hpl.hp.com>
Re: Difference between a .cgi file and a .pl file? <alonio@isdn.net.il>
Re: Difference between a .cgi file and a .pl file? (Abigail)
Re: E-mail processor (Abigail)
Re: easy: forms and frames (Abigail)
Re: executing a WinNT process <alan@igs.net>
Re: executing a WinNT process <lr@hpl.hp.com>
Fancy mail, need help <jheide@sprint.ca>
Re: filehandle (Abigail)
HELP - POST to URL and capture results estonebreaker@my-deja.com
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 14 Jul 2000 17:21:11 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: "Perl Bowling" revisited with an array question
Message-Id: <slrn8mv23j.dun.abigail@alexandra.delanet.com>
Ala Qumsieh (aqumsieh@hyperchip.com) wrote on MMDIX September MCMXCIII in
<URL:news:7abt00kcgy.fsf@merlin.hyperchip.com>:
:)
:) "Jim Kauzlarich" <o1technospam@skyenet.nospam.net> writes:
:)
:) > So, I guess my question is: Is there any function that will shrink (at this
:) > point I don't care which end it comes off of) an array, and return the newly
:) > shrunken array.
:)
:) Hmmm .. what's wrong with:
:)
:) my @all_except_last = @array[0 .. $#array - 1];
:) my @all_except_first = @array[1 .. $#array];
That leaves @array unmodified. So, if you write it as:
@array = @array [1 .. $#array];
it does both requirements. It removes 1 element from @array, and it returns
the "new" array.
Abigail
--
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT
------------------------------
Date: 14 Jul 2000 17:18:55 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: "Perl Bowling" revisited with an array question
Message-Id: <slrn8mv1va.dun.abigail@alexandra.delanet.com>
Ilmari Karonen (iltzu@sci.invalid) wrote on MMDIX September MCMXCIII in
<URL:news:963583664.9274@itz.pp.sci.fi>:
[] In article <3971128f.37528294@nntp.idsonline.com>, Keith Calvert Ivey wrote:
[] >Eh? Like shift() and pop(), splice() returns the removed
[] >elements, not the newly shrunken array.
[]
[] Ah, but it's all in the way you look at it..
[]
[] my @all_but_first = splice @array, 1;
[]
[] my @all_but_last = splice @array, 0, -1;
But that doesn't shrink @array with one element.
Abigail
--
$_ = "\x3C\x3C\x45\x4F\x54"; s/<<EOT/<<EOT/e; print;
Just another Perl Hacker
EOT
------------------------------
Date: Mon, 17 Jul 2000 11:45:08 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: [NEW-B] What's wrong with this script?
Message-Id: <MPG.13dcf40ddf42d8b998abd4@nntp.hpl.hp.com>
In article <g2p4nsodkvms5rbf0kpu014bkpleq9bqbb@4ax.com> on Mon, 17 Jul
2000 09:43:14 +0800, Brian <bt@nospam.com.> says...
> On Mon, 17 Jul 2000 01:40:04 GMT, "Kliffoth" <?@?.?> wrote:
...
> >if ($HASH{'bla'} = 1)
...
> Try if ($HASH{'bla'} == 1)
Or even:
if ($HASH{bla} == 1)
Or even (because a true/false test is all that is required):
if ($HASH{bla})
By the way, using all upper-case letters implies (by historical
convention) a constant, not a variable.
> You're assigning 1 to HASH{'bla'} and the 'if' is evaluating if the assignment
> worked or not.
Not quite -- the 'if' is evaluating the value of the assignment
expression, which is the value assigned, which is '1' (true).
> I can't believe I could answer a question in this forum :)
A more experienced answerer would have added that the use of the '-w'
flag would have pointed this error out immediately.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 17 Jul 2000 14:25:41 -0400
From: cpoole@muskegon.k12.mi.us
Subject: Attatchments from client
Message-Id: <39734FA5.D5D19471@muskegon.k12.mi.us>
Hi,
I have installed Mail::Sender by JENDA and it works well for
attatchments that reside on the server; however, what if I want to send
an attatchment from my client workstation? Does anyone know of the
command I would use to to send a attatchment from my client workstation
(i.e. like a MS word file from my PC) or is there another module out
there which would be better for me to use.
I would appreciate any advice anyone can give me. Thank You.
Regards,
Charles W. Poole, Jr.
Internet System Administrator
Muskegon Public Schools
------------------------------
Date: Mon, 17 Jul 2000 16:40:17 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <39736F31.27EDC209@attglobal.net>
Russ Jones wrote:
>
> Cal Henderson wrote:
> >
> > "Drew Simonis" <care227@attglobal.net> wrote:
> >
> > : I got excited when Kibo sent me email. But I was far more excitable
> > : then.
> >
> > You got mail form kibo? wow.
> >
>
> I bet it wasn't the One True Kibo.
>
Oh, it was. I don't recall why, but he sent me a new text for
my sig file. Something to the effect of "I got mail from Kibo"
Odd, even then.
------------------------------
Date: 13 Jul 2000 15:54:45 EDT
From: David <dlwhite@csua.berkeley.edu>
Subject: B::Lint usage
Message-Id: <396E1E71.B25D77FB@csua.berkeley.edu>
I am attempting to use the B::Lint module to check my perl code. I am
having difficulty with the -u option, and checking packages other than
main. The file I am checking is 'myfile.pl'.
If myfile.pl uses a single-word package name like 'Foo', and puts
'package Foo;' at the top, everything works ok:
Running "perl -MO=Lint,-uFoo,all myfile.pl" produces the warnings that I
expect.
However, if the package name contains several words separated by '::',
it does not work as I expect. If myfile.pl is changed to use a package
name like 'Foo::Bar', and put 'package Foo::Bar' at the top, running
"perl -MO=Lint,-uFoo::Bar,all myfile.pl" produces none of the warnings
that were present before. Since no changes were made other than the
package name, I am assuming this means it had trouble finding the
correct package to check.
What do I need to do to make it check myfile.pl correctly with a package
name like 'Foo::Bar'?
David
------------------------------
Date: 14 Jul 2000 20:21:42 EDT
From: David <david@uclink.berkeley.edu>
Subject: B::Lint usage
Message-Id: <396FAE9C.4A5ABC37@uclink.berkeley.edu>
I am attempting to use the B::Lint module to check my perl code. I am
having difficulty with the -u option, and checking packages other than
main. The file I am checking is 'myfile.pl'.
If myfile.pl uses a single-word package name like 'Foo', and puts
'package Foo;' at the top, everything works ok:
Running "perl -MO=Lint,-uFoo,all myfile.pl" produces the warnings that I
expect.
However, if the package name contains several words separated by '::',
it does not work as I expect. If myfile.pl is changed to use a package
name like 'Foo::Bar', and put 'package Foo::Bar' at the top, running
"perl -MO=Lint,-uFoo::Bar,all myfile.pl" produces none of the warnings
that were present before. Since no changes were made other than the
package name, I am assuming this means it had trouble finding the
correct package to check.
What do I need to do to make it check myfile.pl correctly with a package
name like 'Foo::Bar'?
David
------------------------------
Date: 14 Jul 2000 03:48:10 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: Beginer with question on simple perl/cgi form
Message-Id: <slrn8mtif5.dun.abigail@alexandra.delanet.com>
blue_haulic (fattahipourNOfaSPAM@usa.net.invalid) wrote on MMDVIII
September MCMXCIII in <URL:news:062fbe57.38f89055@usw-ex0109-068.remarq.com>:
-- I have a perl/cgi form that inputs as one of its values the
-- user's email address and area code. The problem is that I'm
-- trying to route the form's contents depending on what area
-- code is inputed. That is, if the area code is 619, I need
-- it to go to john@anywhere.com. If the area code is 858, I
-- need it to go to amy@mars.net. And so on... I'm really
-- stumped on how to do this. I've tried a bunch of different
-- things but they just aren't getting me anywhere. Any help
-- would be greatly appreciated. Thanks.
my @address;
$address [619] = 'john@anywhere.com';
$address [858] = 'amy@mars.net';
my $area_code = some_function_that_finds_the_area_code;
my $send_to = $address [$area_code] or die "Can't find address!\n";
... Do wantever you need to do to send mail to $send_to ...
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
------------------------------
Date: 17 Jul 2000 14:58:36 -0500
From: anti@spamming.org ([ Dr. Jeff ])
Subject: Re: Best solution for this?
Message-Id: <+x1c5gN47weI092yn@muq.org>
In article <XFHF3YCM36724.4357638889@private.citizen>,
anonmix@home.com private.citizen for the people by the people wrote:
>What over the counter remedy is the best for butt fungus?
KY Jelly and your favourite finger or tongue.
--
This signature file is dedicated to Da Gothic Angel herself, Nitallica.
Dr. Jeff is Nitallica's number one fan, willing slave, and keeper of
the strap-on boots she wears when in full battle mode. He also gets the
blueberry squishies whenever she mentions his name. :-)
------------------------------
Date: Mon, 17 Jul 2000 21:01:00 GMT
From: Harry of Harryworld <harryworld@home.com>
Subject: Re: Best solution for this?
Message-Id: <39737202.CA591A5F@home.com>
anonmix@home.com, private.citizen, for, the, people, by, the, people
wrote:
>
> What over the counter remedy is the best for butt fungus?
Try Popeil's Pocket Fungus-Hawg. This powerful little clipper
(batteries not included) will make short work of that rampant mycelium.
When the Fungus-Hawg's patented Fungus-Klippingz reservoir is full, just
empty it into a skillet and saute the fungus in a little olive oil and
garlic cloves. Great on buttecelli pasta! The Fungus-Hawg also chops,
slices, dices, and makes great fungus fries! And you get twelve free
steak knives.
--
Laughter is the true seriousness that destroys all false seriousness.
--M.M. Bakhtin
************************************************
For those pesky pills that won't give it up, check out the extraction
page:
http://members.home.net/harryworld/extraction.html
------------------------------
Date: Mon, 17 Jul 2000 17:34:21 -0400
From: "Low Roller" <roll@night.com>
Subject: Re: Best solution for this?
Message-Id: <9aLc5.30337$qS3.65090@tor-nn1.netcom.ca>
Get a poodle and rub meat on your hole
anonmix@home.com private.citizen for the people by the people wrote in
message ...
>What over the counter remedy is the best for butt fungus?
>
>
------------------------------
Date: 13 Jul 2000 15:39:55 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: Bizarre BEGIN block problem
Message-Id: <slrn8ms7pn.dun.abigail@alexandra.delanet.com>
Ed Foy (ed@nospam.com) wrote on MMDVIII September MCMXCIII in
<URL:news:5mnb5.62962$_b3.1834587@newsread1.prod.itd.earthlink.net>:
$$
$$ I also have a hard and fast rule: never put private email addresses in
$$ newsgroups. This policy keeps the SPAM to a low roar so I spend much
$$ less time wading through junk mail and updating TWIT filters. It's
$$ called an ounce of prevention.
Strange. I've been using Usenet for over 12 years now, using a myriad
of addresses. The past year, I've posted from a handful of addresses,
which all get forwarded to the same mailbox.
Less than 1% of my incoming mail is spam.
Wading through posts of `twits' like you on Usenet take far much time.
If time is so precious for you, what on earth are you doing on Usenet?
$$ >Sticking with 5.004 is volunteering for support problems.
$$
$$ That is what my ISP provides. That is what I must use until they
$$ upgrade. For better or worse, the real world doesn't upgrade just
$$ because there is something newer available. "Newer" doesn't mean better,
$$ just a different set of bugs to contend with. Witness: everything
$$ Microsoft has produced from day one.
Writing CGI programs using an ISP which doesn't give you tech support is
"real world"? Come on, be realistic.
Abigail
--
print v74.117.115.116.32.97.110.111.116.104.101.114.
v32.80.101.114.108.32.72.97.99.107.101.114.10;
------------------------------
Date: Mon, 17 Jul 2000 21:28:44 +0100
From: jb <jbroz@yperite.demon.co.uk>
Subject: Re: Checking the size of an E-mail...
Message-Id: <39736C7C.4B18FED9@yperite.demon.co.uk>
Raphael Pirker wrote:
>
> Thanks! I did come about that far. But the problem is that the e-mail is no
> file! I can read a file, but I didn't figure out how to read in a "couple of
> written bytes". Here's my sendmail code:
>
> open(MAIL,"|$mailprog -t");
>
> print MAIL "To: \"$yourname\" <$admin_recipient>\n";
Use a here document to eliminate all those print statements. Your code
will be cleaner as a result
------------------------------
Date: Mon, 17 Jul 2000 21:56:09 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Computing date + xxx days
Message-Id: <MPG.13de1e4e5f38e0d79896d4@news>
Malcolm Ray wrote ..
>On Mon, 17 Jul 2000 02:50:32 GMT, jason <elephant@squirrelgroup.com> wrote:
>>jhalbrook@my-deja.com wrote ..
>>>I was curious if there is a quick and dirty way to perform
>>>simple date math? I simply need to add xxx number of days
>>>to a given Gregorian date, and produce the resulting date.
>>
>> perldoc -f time
>> perldoc -f localtime
>>
>>you want something like
>>
>> @localtime = localtime( time + 24 * 3600 * $x );
>>
>>where $x is the number of days you want added .. used in a scalar
>>context it will output a string .. the docs tell all
>>
>>btw .. it's quick - but there's nothing dirty about it
>
>Beware: in many (most?) locales, not every day is 24 hours long.
>Think of daylight saving time, and consider what can happen to the
>above code when used during a 25-hour day.
ok .. good point .. it is dirty after all
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Mon, 17 Jul 2000 16:50:17 -0400
From: "Dave McIntyre" <dem@achilles.net>
Subject: context confusion
Message-Id: <8kvrhg$guq$1@bcarh8ab.ca.nortel.com>
Hello c.l.p.misc. For the statement:
if ($val >= 1 && $val <= 99 ) { print "in range";}
could someone please tell me why (or where to look it up) it's printing if
$val="6A"; # or somesuch
Is there a better way to determine if $val is in range?
TIA,
Dave
------------------------------
Date: 17 Jul 2000 21:21:17 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: context confusion
Message-Id: <8kvtcd$trq$4@slb0.atl.mindspring.net>
Dave McIntyre (dem@achilles.net) wrote:
: Hello c.l.p.misc. For the statement:
:
: if ($val >= 1 && $val <= 99 ) { print "in range";}
:
: could someone please tell me why (or where to look it up) it's printing if
:
: $val="6A"; # or somesuch
You're getting bitten by Perl's string-to-number conversion rules. If a
string begins with numeric characters (digits, minus sign, etc) it will
convert those to a number and ignore the rest of the string if the string
is being used in a numeric context (such as that imposed by the numeric
comparison operators). Therefore, "6A" is treated as 6 for numeric
comparison purposes.
: Is there a better way to determine if $val is in range?
Make sure it's a number (see the FAQ for ways to do this) before using it
in a numeric comparison.
------------------------------
Date: Mon, 17 Jul 2000 14:28:51 -0700
From: "Jürgen Exner" <juex@deja.com>
Subject: Re: context confusion
Message-Id: <39737a93$1@news.microsoft.com>
"Dave McIntyre" <dem@achilles.net> wrote in message
news:8kvrhg$guq$1@bcarh8ab.ca.nortel.com...
> Hello c.l.p.misc. For the statement:
>
> if ($val >= 1 && $val <= 99 ) { print "in range";}
>
> could someone please tell me why (or where to look it up) it's printing if
>
> $val="6A"; # or somesuch
Quite simple: 6 is greater-equal 1 and 6 is less-equal 99, therefore the
condition is true.
Maybe you forgot that "6" is returned as the numerical value of the string
"6A"?
> Is there a better way to determine if $val is in range?
What's wrong with your version?
jue
------------------------------
Date: Mon, 17 Jul 2000 17:52:57 -0400
From: "Dave McIntyre" <dem@achilles.net>
Subject: Re: context confusion
Message-Id: <8kvv70$jvs$1@bcarh8ab.ca.nortel.com>
"Eric Bohlman" <ebohlman@netcom.com> wrote in message
news:8kvtcd$trq$4@slb0.atl.mindspring.net...
> Make sure it's a number (see the FAQ for ways to do this) before using it
> in a numeric comparison.
Great, found it in perlfaq4. Thanks, Eric and Jurgen.
Dave
------------------------------
Date: 18 Jul 2000 00:03:10 +0200
From: Jakob Schmidt <sumus@aut.dk>
Subject: Re: context confusion
Message-Id: <itu4tnxd.fsf@macforce.sumus.dk>
"Dave McIntyre" <dem@achilles.net> writes:
> if ($val >= 1 && $val <= 99 ) { print "in range";}
>
> could someone please tell me why (or where to look it up) it's printing if
>
> $val="6A"; # or somesuch
Whaddaya mean "it's printing"? It isn't on my machine.
The operators <= and >= expect numbers. "A6" is zero to them. I'm not
really sure why it's not 6 like it is to int(), but there it is.
> Is there a better way to determine if $val is in range?
In my opinion the condition is OK in itself but if your using $val in that
context and it contains something that isn't a number then some part of
your code isn't OK. If you allow yourself to put salt in the sugar bin
you may get salty coffee at some point.
Unless you drink coffee without sugar. In that case try arsenik in the
flour bag in stead.
--
Jakob
------------------------------
Date: Mon, 17 Jul 2000 18:03:28 GMT
From: rrubin@rotor.net
Subject: date in YYYYMMDDHH24MISS format
Message-Id: <8kvhp2$3n2$1@nnrp1.deja.com>
Hello,
I need to format a date in the following format
YYYYMMDDHH24MISS
Any help would be appreciated.
RR
rrubin@rotor.net
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 17 Jul 2000 13:32:14 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: date in YYYYMMDDHH24MISS format
Message-Id: <874s5ohakx.fsf@limey.hpcc.uh.edu>
>> On Mon, 17 Jul 2000 18:03:28 GMT,
>> rrubin@rotor.net said:
> Hello, I need to format a date in the following format
> YYYYMMDDHH24MISS
perldoc POSIX
strftime
use POSIX qw(strftime);
my $date = strftime('%Y%m%d%H24%M%S', localtime);
(I presume the "24" is meant to be a literal? %I instead
of %H does the 12/24 hour clock shift)
hth
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: Mon, 17 Jul 2000 11:25:11 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: date in YYYYMMDDHH24MISS format
Message-Id: <8kvj41$d32$1@brokaw.wa.com>
<rrubin@rotor.net> wrote in message news:8kvhp2$3n2$1@nnrp1.deja.com...
> Hello,
>
> I need to format a date in the following format
>
>
> YYYYMMDDHH24MISS
Check out the sprintf() function.
perldoc -f sprintf
Lauren
------------------------------
Date: Mon, 17 Jul 2000 11:55:49 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Did I FLOCK this correctly?
Message-Id: <MPG.13dcf693b179fc6698abd5@nntp.hpl.hp.com>
In article <4423-3972B096-138@storefull-244.iap.bryant.webtv.net> on
Mon, 17 Jul 2000 02:07:02 -0500 (CDT), BUCK NAKED1 <dennis100@webtv.net>
says...
...
> 1 while $hits =~ s/(.*\d)(\d\d\d)/$1,$2/;
> 1 while $hits =~ s/(11$|12$|13$)/$1th/;
> 1 while $hits =~ s/(1$)/$1st/;
> 1 while $hits =~ s/(2$)/$1nd/;
> 1 while $hits =~ s/(3$)/$1rd/;
> 1 while $hits =~ s/(4$|5$|6$|7$|8$|9$|0$)/$1th/;
Though you didn't ask about this part, a comment must be made. You are
programming here by cargo-culting yourself. Your first regex commifies
the number, which requires a loop. But the others just test and append
to the end of the number, of which there is only one such. So the loops
are just silly.
Just for neatness, you could combine a couple of them, and factor out
the end-of-string anchor:
$hits =~ s/(1[123]|[4-90])$/$1th/;
I' sure that there is an ordinalizing module in CPAN, but the code you
have is quite workable.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 17 Jul 2000 23:17:28 -0000
From: "Alon Rachamim" <alonio@isdn.net.il>
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <3973653c@news.bezeqint.net>
I think and for what I tested no difrence only .cgi can be for other script
language and .pl is for Perl only
DS <snakeman@kc.rr.com> wrote in message
news:vjmc5.94$L5.2310@typhoon.kc.rr.com...
> What is the diference betweeen a .pl file and a .cgi file?
> Can I convert a .pl to a .cgi?
>
>
> Thanks
> Dirk
>
>
------------------------------
Date: 17 Jul 2000 10:16:23 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: Difference between a .cgi file and a .pl file?
Message-Id: <slrn8n66b0.ibq.abigail@alexandra.delanet.com>
DS (snakeman@kc.rr.com) wrote on MMDXI September MCMXCIII in
<URL:news:vjmc5.94$L5.2310@typhoon.kc.rr.com>:
][ What is the diference betweeen a .pl file and a .cgi file?
The name.
][ Can I convert a .pl to a .cgi?
Sure. Rename the file.
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: 15 Jul 2000 19:31:43 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: E-mail processor
Message-Id: <slrn8n1u49.ibq.abigail@alexandra.delanet.com>
Screndib (screndib@aol.com) wrote on MMDX September MCMXCIII in
<URL:news:20000715191301.18156.00000372@ng-mb1.aol.com>:
`' I need a way to analyze e-mail that is in this form:
`'
`' --------------------------------------------------
`' Fill in an 'x' in the box next to your choice.
`'
`' A[]
`' B[]
`' C[]
`' D[]
`' E[]
`'
`' Num: 2498
`' --------------------------------------------------
`'
`' It needs to record the marks in some way so they can be displayed and edited
`' another program. It must also be able to handle screwed up input. I've seen
`' mails like this before, so I would think that there would be the code out the
`' somewhere. Can someone point me in the right direction?
Somewhere, I would do:
/([A-E])\[x\]/ and $totals {$1} ++;
`' If there isn't something I can use, can someone give me some tips on how I
`' would start on this?
Your specification is extremely vague, and you provided not a singly byte
of your own code.
This isn't a "do my work for me" group.
But here's a tip anyway. Always use -w. Always use strict.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
------------------------------
Date: 17 Jul 2000 10:17:25 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: easy: forms and frames
Message-Id: <slrn8n66cu.ibq.abigail@alexandra.delanet.com>
n (nospam@mistnet.com) wrote on MMDXI September MCMXCIII in
<URL:news:3971da5f@news.iprimus.com.au>:
[]
[] Anyone know how to pass data from a non forms, cgi generated page, to a page
[] which is part of a frameset?
The same way as you would do for a program written in COBOL.
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");
------------------------------
Date: Mon, 17 Jul 2000 15:25:34 -0400
From: "Alan Honsinger" <alan@igs.net>
Subject: Re: executing a WinNT process
Message-Id: <8kvmp3$ohi$1@news.igs.net>
try this:
system("c:/my\ files/test.exe");
Alan
<sanjay33@my-deja.com> wrote in message news:8kva1s$t11$1@nnrp1.deja.com...
>
>
> I am trying to run a program on NT through my perl scripy using the
> 'system` command
>
> ie,
>
> system("c:/my files/test.exe");
>
> The problem is caused by the space in the direcroty name which WinNT
> allows. The shell complains about this call saying that it is not
> recognised as an executable program.
>
> Can anyone tell me how to solve it?
>
> thanks
> sanjay
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Mon, 17 Jul 2000 14:24:30 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: executing a WinNT process
Message-Id: <MPG.13dd1968b33392c198abd9@nntp.hpl.hp.com>
[Reordered for logical flow of discourse.]
In article <8kvmp3$ohi$1@news.igs.net> on Mon, 17 Jul 2000 15:25:34 -
0400, Alan Honsinger <alan@igs.net> says...
> <sanjay33@my-deja.com> wrote in message news:8kva1s$t11$1@nnrp1.deja.com...
> >
> > I am trying to run a program on NT through my perl scripy using the
> > 'system` command
> >
> > ie,
> >
> > system("c:/my files/test.exe");
> >
> > The problem is caused by the space in the direcroty name which WinNT
> > allows. The shell complains about this call saying that it is not
> > recognised as an executable program.
> try this:
>
> system("c:/my\ files/test.exe");
That compiles into the identical string as the one reported to fail.
Try replacing the double-quotes by single-quotes, or doubling the
backslash.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 17 Jul 2000 12:31:52 -0700
From: "Glen Heide" <jheide@sprint.ca>
Subject: Fancy mail, need help
Message-Id: <3cJc5.10881$_J1.117916@newscontent-01.sprint.ca>
Does anyone know how to send an e-mail with HTML formatting using Perl?
I currently use the "sendmail" program on the Unix server to send a plain
text e-mail message.
--
Yours Truly,
Glen Heide
------------------------------
Date: 14 Jul 2000 02:22:23 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: filehandle
Message-Id: <slrn8mtdec.dun.abigail@alexandra.delanet.com>
Umesh (nair@ee.tamu.edu) wrote on MMDVIII September MCMXCIII in
<URL:news:Pine.GSO.4.21.0007131329420.13659-100000@eesun1.tamu.edu>:
__
__ Is it possible to get the filename by knowing only the filehandle ?
No.
The reason is that there isn't a 1-1 relation between filehandles and
filenames. It's a a many-to-many, for as little many as 0. A file can
have more than one name (hardlinks), or no name at all (that's why there
is a function unlink(), and delete() has nothing to do with files).
__ i.e the filehandle is passed to a subroutine (as a typeglob or object from
__ FileHandle), and i need to say print the name of file from within
__ subroutine?
Then you pass two arguments.
Abigail
--
print v74.117.115.116.32, v97.110.111.116.104.101.114.32,
v80.101.114.108.32, v72.97.99.107.101.114.10;
------------------------------
Date: Mon, 17 Jul 2000 21:40:04 GMT
From: estonebreaker@my-deja.com
Subject: HELP - POST to URL and capture results
Message-Id: <8kvufh$e35$1@nnrp1.deja.com>
I'm in desperate need to learn how to POST a request to a URL and
capture the results. I have to mimic some ASP code that I've included
below:
Set HttpObj = Server.CreateObject("AspHTTP.Conn")
HttpObj.RequestMethod = "POST" ' GET
HttpObj.FollowRedirects = false
rem HttpObj.TimeOut = 80
HttpObj.Url = "http://" & server_name & ":" & port & path
' HttpObj.Port = port ' This object is buggy, and does not
support this property, despite the documentation
HttpObj.PostData = qs
HttpObj.UserAgent = "Mozilla/2.0 (compatible; MSIE 3.0B;
Windows NT)"
result = HttpObj.GetURL
Set HttpObj = Nothing
HTTPPost = result
Thanks,
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
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 3695
**************************************