[17430] in Perl-Users-Digest
Perl-Users Digest, Issue: 4850 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 8 21:10:40 2000
Date: Wed, 8 Nov 2000 18:10:14 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <973735814-v9-i4850@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 8 Nov 2000 Volume: 9 Number: 4850
Today's topics:
Re: Perl DBD::ODBC compilation problem on Tru64 <kstep@pepsdesign.com>
Re: Perl vs. ActivePerl (newbie) <kstep@pepsdesign.com>
perl5porters: defined @array depricated? -- PROBLEMS! (Jari Aalto+mail.perl)
Re: Pushing a hash on to a stack... (Christopher Burke)
Re: Pushing a hash on to a stack... <jeff@yoak.com>
Re: Pushing a hash on to a stack... (Christopher Burke)
Re: Pushing a hash on to a stack... <james@NOSPAM.demon.co.uk>
Re: Pushing a hash on to a stack... (Christopher Burke)
Re: Pushing a hash on to a stack... (Christopher Burke)
Re: Pushing a hash on to a stack... (Martien Verbruggen)
Re: Pushing a hash on to a stack... (Martien Verbruggen)
Re: Redirect a user by country ? <newsposter@cthulhu.demon.nl>
Re: Redirect a user by country ? <mtaylorlrim@my-deja.com>
Re: Redirect a user by country ? <jeff@vpservices.com>
Re: Redirect a user by country ? <peter.sundstrom@eds.com>
What's with taint???? <kj0@mailcity.com>
Re: What's with taint???? <godoy@conectiva.com>
Re: What's with taint???? (Mark-Jason Dominus)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 8 Nov 2000 20:21:35 -0500
From: "Kurt Stephens" <kstep@pepsdesign.com>
Subject: Re: Perl DBD::ODBC compilation problem on Tru64
Message-Id: <8ucu6n$8sn$1@slb7.atl.mindspring.net>
<mshemer@my-deja.com> wrote in message news:8uckja$egt$1@nnrp1.deja.com...
> Hi -
>
> I was hoping that someone would have a suggestion for the compilation
problem
> I'm having with Perl's DBD::ODBC module. The OS of the machine I'm on is
> Tru64 OSF1 V5.0.
>
> First, I have successfully installed the OpenLink software (Universal Data
> Access Drivers Multi-Tier Editon and SDK). I have also tested it using
the
> odbctest and can successfully run SQL statements against the remote
server.
>
> Next, I have successfully installed the Perl DBI module.
>
> Finally though, when trying to install the Perl DBD::ODBC module I get the
> compilation errors saying that semicolons are missing from the isql.h and
> isqlext.h files. (I'm including the perl Makefile.PL output and make
output
> at the end of this article)
>
> Please let me know if you have any idea why this is happening and how to
fix
> it.
>
> Thanks,
> Mike
> Michael Hemer
> michael.hemer@cleardata.net
>
You ain't missin' no semicolons, yer missin' yer whole dern memory model
declaration!
Seriously, the compiler is choking on lines like
> cc: Error: /usr/users/improv/openlink/odbcsdk/include/isql.h, line 13:
> Missing ";". (nosemi)
> typedef void FAR *HSTMT;
> -----------------^
and
cc: Error: /usr/users/improv/openlink/odbcsdk/include/isqlext.h, line
1060: Missing ";". (nosemi)
RETCODE SQL_API SQLGetData (HSTMT hstmt, UWORD icol, SWORD fCType,
--------^
I would suspect that somewhere in the include files (or the files that they
include) there are a few lines like:
#ifdef WIN32
#define FAR far
#elsif ...
#endif
I am guessing that the include files do not contain provisions for your OS
and macros such as FAR and RETCODE are not being properly defined. You may
need to supply some additional values to MakeMaker in the 'perl Makefile.PL'
stage of your installation, particularly the INC and DEFINE parameters.
The example below is guaranteed to be TOTALLY WRONG, but you may wind up
with something that looks like:
perl Makefile.PL INC='tru64.h' DEFINE='TRU64'
Again, this is just a guess, but it my point you in the right direction.
Kurt Stephens
------------------------------
Date: Wed, 8 Nov 2000 19:34:27 -0500
From: "Kurt Stephens" <kstep@pepsdesign.com>
Subject: Re: Perl vs. ActivePerl (newbie)
Message-Id: <8ucrc0$9vi$1@slb6.atl.mindspring.net>
"Michael Carman" <mjcarman@home.com> wrote in message
news:3A09C184.B9544603@home.com...
>
> If your question is "Can I run a Win* binary on a *nix machine?" the
> answer is "Of course not. What the h*ll are you thinking?" ;)
>
> -mjc
I was about to give a similar response, however I checked the ActiveState
site first and found that they also have binary distributions for Solaris
2.6+ and Linux 2.x. Learn something new every day...
------------------------------
Date: 09 Nov 2000 01:48:40 +0200
From: jari.aalto@poboxes.com (Jari Aalto+mail.perl)
Subject: perl5porters: defined @array depricated? -- PROBLEMS!
Message-Id: <jnbsvqf2jr.fsf@blue.sea.net>
Keywords: array,print,defined,def,module,perl
The latest perl documentation says that to test for array
existence, you should NOT use `defined' and it recommends the `if' test.
However, I can see a problem here. If module declares variables that
you could use, how do you know if they exist or not, if you have
to rely on the `if'. Here the `@array' is definitely declared and only
detected by the DEFINED.
Module A. Declares an array
Module B. Wants to see if that array exists - maybe the name has
been renamed in later versions of the module...
--> defined works but is depricated.
`if' is recommended but doesn't work ???
I know that @array in scalar context counts the number of elements in
the array, but that will certainly not tell if the array was declared,
so why if the defined depricated for arrays and hashes in perl?
Jari
-----------------------------------------------------------------------
No array << If would say that array does not exist in recent perl?
def array
array
def array
-----------------------------------------------------------------------
my @array;
@array 0 819;
@array 0 89;
if 8 @array 9 { print "array\n"; } else { print "No array\n"; }
if 8 defined @array 9 { print "def array\n"; } else { print "No def array\n"; }
@array 0 819;
if 8 @array 9 { print "array\n"; } else { print "No array\n"; }
if 8 defined @array 9 { print "def array\n"; } else { print "No def array\n"; }
------------------------------
Date: Wed, 08 Nov 2000 23:42:14 GMT
From: craznar@hotmail.com (Christopher Burke)
Subject: Re: Pushing a hash on to a stack...
Message-Id: <8FE760102Craznar@24.192.1.17>
tjla@guvfybir.qlaqaf.bet (Gwyn Judd) wrote in
<slrn90ibqh.hbr.tjla@thislove.dyndns.org>:
>
>hate to bust your bubble but %{$fulldata[scalar @fulldata]} = %hash;
>does use references
>
OK - the clarification, I cannot use references in the hash creation part
of the code, or the hash reading part of the code. The push line itself can
do anything it wants to (because it will be hidden from the user).
--
---
/* Christopher Burke - Spam Mail to craznar@hotmail.com
|* www.craznar.com - International Internet Writing Experiment
\* Real mail to cburke(at)craznar(dot)com
------------------------------
Date: Wed, 08 Nov 2000 18:49:28 +0800
From: "Jeff Yoak" <jeff@yoak.com>
Subject: Re: Pushing a hash on to a stack...
Message-Id: <8ucor40psu@news2.newsguy.com>
In article <8FE6A4D54craznar@130.102.2.1>, "Christopher Burke"
<craznar@hotmail.com> wrote:
> So you believe I should use references, well I know I shouldn't and have
> valid reasons not to.
Look, you've said something that on the surface sounds silly. Expert
people have pointed this out and even provided a lot of discussion and
even code on how you might solve your problem given what sounds like an
inane requirement.
Give something back to us. Explain why this requirement exists. You
made some reference to some meta-language that wouldn't allow the use of
references. I can't imagine what something like that would look like or
what it would be useful for. Enlighten me. Show us all. Maybe you're
doing something cool that will entertain, help, educate or improve us.
But lay off the magic. Don't tell us, "No, I have a VERY GOOD reason for
not writing code that uses the letter 'x' in it, but alas it is a s3krit" Show us why.
I realize this is coming off negatively, and I admit I feel that way...
but I'm trying to provide a positive spin. Show us something new.
Something we can't imagine. (And if it is Perl 4, I can neither imagine
that you wouldn't have mentioned it or that you're using it.) I'll even
go this far... if you do, I'll write you a push and pop / stack that
doesn't use any references. Others have mentioned the blueprint. I'll
give you the full implementation. Just explain it so it makes sense.
Cheers,
Jeff
------------------------------
Date: Thu, 09 Nov 2000 01:14:48 GMT
From: craznar@hotmail.com (Christopher Burke)
Subject: Re: Pushing a hash on to a stack...
Message-Id: <8FE778658Craznar@24.192.1.17>
jeff@yoak.com (Jeff Yoak) wrote in <8ucor40psu@news2.newsguy.com>:
>Look, you've said something that on the surface sounds silly. Expert
>people have pointed this out and even provided a lot of discussion and
>even code on how you might solve your problem given what sounds like an
>inane requirement.
>
I asked a fairly simple question, which I knew had a difficult answer. I
posted a very small bit of code demonstrating what my problem was.
During the time which I had to rapidly defend myself against ever
increasing attacks - I slipped once in one message.
The original post is still a valid question, but I now know two things.
1. There is no answer of how to use 'push' to push a hash onto an array.
2. There is so many smart arse people on this newsgroup that once a newbie
comes along with a question they cannot answer - they start attacking the
newbie for having the hide to propose a question without an answer.
To clarify - the 'push line can use references until the cows come home'
however the code that puts the elements into the hash CANNOT, and neither
can the code that extracts the elements at the end.
i.e.
%hash{x} = 3; # this line is fixed
%hash{y} = 4; # as is this
push @fulldata, ???(%hash)??? # whatever references you want
print $fulldata[0]{x}; # this line is fixed - prints 3
print $fulldata[0]{y}; # this line is fixed - prints 4
Thats all...
--
---
/* Christopher Burke - Spam Mail to craznar@hotmail.com
|* www.craznar.com - International Internet Writing Experiment
\* Real mail to cburke(at)craznar(dot)com
------------------------------
Date: Thu, 9 Nov 2000 01:10:40 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: Pushing a hash on to a stack...
Message-Id: <ant0901400b0fNdQ@oakseed.demon.co.uk>
In article <8FE760102Craznar@24.192.1.17>, Christopher Burke
<URL:mailto:craznar@hotmail.com> wrote:
>
> OK - the clarification, I cannot use references in the hash
> creation part of the code, or the hash reading part of the
> code. The push line itself can do anything it wants to
> (because it will be hidden from the user).
But why, please tell us why. Curiosity is killing me.
Is it that you are trying to pretend to the "user" that references
do not exist, and you're therefore pretending that things like
$fulldata[0]{X} aren't really using references?
Or is it a homework specification that you are trying to meet?
Or is there some other powerful mystic reason for avoiding
references (or more specifically avoiding \ characters) outside
the implementation of your own push and pop functions?
--
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02
------------------------------
Date: Thu, 09 Nov 2000 01:19:43 GMT
From: craznar@hotmail.com (Christopher Burke)
Subject: Re: Pushing a hash on to a stack...
Message-Id: <8FE7778A5Craznar@24.192.1.17>
jeff@yoak.com (Jeff Yoak) wrote in <8ucor40psu@news2.newsguy.com>:
>I realize this is coming off negatively, and I admit I feel that way...
>but I'm trying to provide a positive spin. Show us something new.
>Something we can't imagine. (And if it is Perl 4, I can neither imagine
>that you wouldn't have mentioned it or that you're using it.) I'll even
>go this far... if you do, I'll write you a push and pop / stack that
>doesn't use any references. Others have mentioned the blueprint. I'll
>give you the full implementation. Just explain it so it makes sense.
>
Part II
=======
The end user writes some of the bits of code (in config files), I strip all
references and the like to avoid them writing config files which crap all
over the system. They get to refer to things purely as $fulldata[n]{name}
in their 'perl' code.
The point here is I already have a solution as posted in the intitial
message, I was just asking nicely if I could to it with push/pop.
--
---
/* Christopher Burke - Spam Mail to craznar@hotmail.com
|* www.craznar.com - International Internet Writing Experiment
\* Real mail to cburke(at)craznar(dot)com
------------------------------
Date: Thu, 09 Nov 2000 01:21:29 GMT
From: craznar@hotmail.com (Christopher Burke)
Subject: Re: Pushing a hash on to a stack...
Message-Id: <8FE770B96Craznar@24.192.1.17>
james@NOSPAM.demon.co.uk (James Taylor) wrote in
<ant0901400b0fNdQ@oakseed.demon.co.uk>:
>Is it that you are trying to pretend to the "user" that references
>do not exist, and you're therefore pretending that things like
>$fulldata[0]{X} aren't really using references?
>
Not according to the definition I have been brought up with for the 18
years I have been programming in the 11 languages I have used.
This all comes down to nitpicking about language again.
--
---
/* Christopher Burke - Spam Mail to craznar@hotmail.com
|* www.craznar.com - International Internet Writing Experiment
\* Real mail to cburke(at)craznar(dot)com
------------------------------
Date: Thu, 09 Nov 2000 01:56:56 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Pushing a hash on to a stack...
Message-Id: <slrn90k13b.7ck.mgjv@verbruggen.comdyn.com.au>
On Wed, 08 Nov 2000 23:42:14 GMT,
Christopher Burke <craznar@hotmail.com> wrote:
> tjla@guvfybir.qlaqaf.bet (Gwyn Judd) wrote in
><slrn90ibqh.hbr.tjla@thislove.dyndns.org>:
>
>>
>>hate to bust your bubble but %{$fulldata[scalar @fulldata]} = %hash;
>>does use references
>>
>
> OK - the clarification, I cannot use references in the hash creation part
> of the code, or the hash reading part of the code. The push line itself can
> do anything it wants to (because it will be hidden from the user).
So, what you are saying is that you're happy to use references, you
just don't want them exposed to the users of your library? Why didn't
you just say that right away?
But that is fine. And the solutions posted already allow you to do
this. Of course, what you'll be returning, and pushing are actually
_copies_ of the hash. If that's ok, then there's no problem at all. If
you want to return the actual hashes, you'll have to use a reference,
because that's the only way to do that.
Anyway, The following probably does what you want:
#!/usr/local/bin/perl -wl
use strict;
{
my @HashStack;
sub push_hash (\%)
{
my $href = shift;
push @HashStack, {%$href};
}
sub pop_hash
{
my $href = pop @HashStack;
return %{$href};
}
}
# And for the usage:
my %hash = (foo => 1, bar => 2, baz => 3);
push_hash %hash;
$hash{banana} = 4; # HASH ASSIGNMENT
my %chash = pop_hash;
while (my ($key, $value) = each %chash)
{
print "$key, $value";
}
This has to make a copy of the hash twice. Once when it gets pushed in
(because you don't want the line marked with HASH ASSIGNMENT to
influence the copy in the stack), and once when it returns the data
(because you don't want to return references). If your hashes get
large, then those copies may become a significant factor. But that's
the price you pay for not wanting references.
If you do want that marked line to change the hash in the stack, then
change the push line to
push @HashStack, $href;
You might want to put that code in a module, and 'use' it in your
programs. Make sure the module exports the push_hash and pop_hash
functions. If you don't know, but the idea sounds ok to you, ask, and
we'll show you how to do it. You might want to read the Exporter
manual page before you ask, though.
HTH,
Martien
--
Martien Verbruggen |
Interactive Media Division | That's funny, that plane's dustin'
Commercial Dynamics Pty. Ltd. | crops where there ain't no crops.
NSW, Australia |
------------------------------
Date: Thu, 09 Nov 2000 02:01:36 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Pushing a hash on to a stack...
Message-Id: <slrn90k1c3.7ck.mgjv@verbruggen.comdyn.com.au>
On Thu, 09 Nov 2000 01:21:29 GMT,
Christopher Burke <craznar@hotmail.com> wrote:
> james@NOSPAM.demon.co.uk (James Taylor) wrote in
><ant0901400b0fNdQ@oakseed.demon.co.uk>:
>
>>Is it that you are trying to pretend to the "user" that references
>>do not exist, and you're therefore pretending that things like
>>$fulldata[0]{X} aren't really using references?
>>
>
> Not according to the definition I have been brought up with for the 18
> years I have been programming in the 11 languages I have used.
>
> This all comes down to nitpicking about language again.
No, it doesn't. This is Perl. Perl uses references for nested data
structures. It also gives you some syntactic sugar so you don't
actually have to dereference all references. In the example above, the
references are there, but the dereferencing is implicit.
This is not C. It's Perl. It's not nitpicking, this is how Perl works.
How other languages resolve and implement syntax similar to the above,
has nothing to do with how Perl does it. Denying that there are
references is just silly, because it prevents you from understanding
what is going on, and how your stuff is stored.
And it promotes misunderstanding when you talk to Perl programmers,
like this whole thread proves. Just call the things what they are.
What you present to users of your classes/modules/libraries is another
issue, but again, it's syntactic sugar. Niceties. DWIMmery. The
references are there, and they're real.
Martien
--
Martien Verbruggen |
Interactive Media Division | 42.6% of statistics is made up on the
Commercial Dynamics Pty. Ltd. | spot.
NSW, Australia |
------------------------------
Date: 8 Nov 2000 23:28:23 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Redirect a user by country ?
Message-Id: <8ucnin$q61$2@internal-news.uu.net>
Randy Kobes <randy@theoryx5.uwinnipeg.ca> wrote:
> In comp.lang.perl.misc, Erik <koeleman@cistron.nl> wrote:
>> "Clay Irving" <clay@panix.com> schreef in bericht
>> news:slrn90jf05.iqv.clay@panix2.panix.com...
>>> On Wed, 8 Nov 2000 21:36:36 +0100, Erik <koeleman@cistron.nl> wrote:
>>>
>>> >I'm looking for a perl script that redirect a user by country when they
>>> >arive on my site...
>>> >Can someone help me with that?
>>>
>>> How are you going to know which country a user's request originates?
>>>
>> Looking to the domain-extension from their ISP
>> .com/.net etc.. > English
>> .nl > Dutch
>> .fr > French
> What about, eg, http://www.nl.uu.net/?
Or countries with multiple languages like Belgium, or people living in
foreign countries, of people in non-english countries with .com or .net
addresses ...
And the funny part is that everybody can select their preferred language
in their browser, and webservers can use that information to decide what
document to send. But that has little to do with Perl.
Erik
------------------------------
Date: Thu, 09 Nov 2000 01:03:00 GMT
From: Mark <mtaylorlrim@my-deja.com>
Subject: Re: Redirect a user by country ?
Message-Id: <8uct41$luh$1@nnrp1.deja.com>
In article <8ucdb3$d20$1@voyager.cistron.net>,
"Erik" <koeleman@cistron.nl> wrote:
> Hello,
>
> I'm looking for a perl script that redirect a user by country when
they
> arive on my site...
> Can someone help me with that?
>
> Erik
>
>
You don't really need a script for that. As Erik stated, a user has the
ability to set his default/preferred language in his browser settings.
Most http servers have this ability built in to serve up the correct
page. You just have to provide individual pages.
For example....
If a browser request is for index.html, and the following files are
available in the directory,
index.html
index.html.fr
index.html.gr
index.html.it
The client/server will select index.html.fr if the browser language
preference is set to French, index.html.gr if it is set to German, and
index.html.it if set to Italian...and so on..
Of course the AddLanguage setting must be done in the srm.conf file on
the web server, so if it does not work as expected have a talk with
your server manager to see if he can enable language handling.
Mark
--
Please reply to this newsgroup as my Deja mail
is used as a spam catcher only!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 08 Nov 2000 17:21:55 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Redirect a user by country ?
Message-Id: <3A09FC33.4D6183D2@vpservices.com>
Mark wrote:
>
> In article <8ucdb3$d20$1@voyager.cistron.net>,
> "Erik" <koeleman@cistron.nl> wrote:
>
> > I'm looking for a perl script that redirect a user by country
> >
> You don't really need a script for that. As Erik stated, a user has the
> ability to set his default/preferred language in his browser settings.
language != country
If my preferred language is English, do I live U.S., England, Australia
...
If my preferred language is French, do I live in France, Canada, Senegal
...
If my preferred language is Spanish ...
To know the answer, you'd have to ask me, then believe what I tell you.
Your script would have to do the same to redirect by country.
--
Jeff
------------------------------
Date: Thu, 9 Nov 2000 14:01:02 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Redirect a user by country ?
Message-Id: <8uct6a$3p6$1@hermes.nz.eds.com>
Randy Kobes <randy@theoryx5.uwinnipeg.ca> wrote in message
news:8uclfv$hp2$1@canopus.cc.umanitoba.ca...
> In comp.lang.perl.misc, Erik <koeleman@cistron.nl> wrote:
> > "Clay Irving" <clay@panix.com> schreef in bericht
> > news:slrn90jf05.iqv.clay@panix2.panix.com...
> >> On Wed, 8 Nov 2000 21:36:36 +0100, Erik <koeleman@cistron.nl> wrote:
> >>
> >> >I'm looking for a perl script that redirect a user by country when
they
> >> >arive on my site...
> >> >Can someone help me with that?
> >>
> >> How are you going to know which country a user's request originates?
> >>
> > Looking to the domain-extension from their ISP
> > .com/.net etc.. > English
> > .nl > Dutch
> > .fr > French
>
> What about, eg, http://www.nl.uu.net/?
What language do I speak if I use a .no or .nu domain?
------------------------------
Date: 8 Nov 2000 18:28:27 -0500
From: kj0 <kj0@mailcity.com>
Subject: What's with taint????
Message-Id: <8ucnir$eru$1@panix3.panix.com>
Under -T, my cgi program produces the error:
Insecure directory in $ENV{PATH} while running with -T switch at /ho\
me/me/www/cgi/foo.cgi line 200.
but the code that triggers this error is the following pipe opening:
$ENV{'PATH'} = '';
open(PRINTER, "|/usr/bin/lp -d myprinter 2>&1 1>/dev/null")
or die "$!";
How can there be an insercure directory in $ENV{PATH} when it contains
only the null string??? What more do I need to do to pacify -T?
Thanks for all your help!
KJ
------------------------------
Date: 08 Nov 2000 21:57:40 -0200
From: Jorge Godoy <godoy@conectiva.com>
Subject: Re: What's with taint????
Message-Id: <kppuk6dnkb.fsf@dagon.conectiva>
On 8 Nov 2000, kj0@mailcity.com wrote:
> Under -T, my cgi program produces the error:
>
> Insecure directory in $ENV{PATH} while running with -T switch at
> /ho\ me/me/www/cgi/foo.cgi line 200.
>
> but the code that triggers this error is the following pipe opening:
>
> $ENV{'PATH'} = '';
Instead of doing this, why dont you:
delete $ENV{'PATH'};
It might help.
See you,
--
Godoy. <godoy@conectiva.com>
Departamento de Publicações Conectiva S.A.
Publishing Department Conectiva Inc.
------------------------------
Date: Thu, 09 Nov 2000 01:29:19 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: What's with taint????
Message-Id: <3a09fdef.3b97$be@news.op.net>
Keywords: Dunedin, Sophocles, fructify, sparrow
In article <8ucnir$eru$1@panix3.panix.com>, kj0 <kj0@mailcity.com> wrote:
>Under -T, my cgi program produces the error:
>
> Insecure directory in $ENV{PATH} while running with -T switch at /ho\
> me/me/www/cgi/foo.cgi line 200.
>
>but the code that triggers this error is the following pipe opening:
>
> $ENV{'PATH'} = '';
> open(PRINTER, "|/usr/bin/lp -d myprinter 2>&1 1>/dev/null")
> or die "$!";
Perl is right. An empty PATH variable is interpreted by the system as
a request to search the current directory only. Searching the current
directory is insecure.
>How can there be an insercure directory in $ENV{PATH} when it contains
>only the null string??? What more do I need to do to pacify -T?
An explicit path. Try "/bin".
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
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 4850
**************************************