[13161] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 571 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 18 05:07:13 1999

Date: Wed, 18 Aug 1999 02:05:11 -0700 (PDT)
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, 18 Aug 1999     Volume: 9 Number: 571

Today's topics:
    Re: $1/MINUTE PHONESEX W/ REAL PEOPLE LIKE YOURSELF 658 <lucas7@home.com>
    Re: <== importing hash symbols from one package to anot <rick.delaney@home.com>
        CGI and NT <stevencNOSPAM@nbnet.nb.ca>
        CGI and param (Derek)
    Re: DBI & Oracle connect problem. (Martin Redmond)
    Re: DBI: prepare, and execute with placeholders - fails <rhrh@hotmail.com>
        do '.conf.pl'; syntax in modules (William Herrera)
    Re: HARASSMENT -- Monthly Autoemail greg@apple2.com
    Re: Language survey (I.J. Garlick)
    Re: launching applications <kangas@anlon.com>
        Modules in perl/site/lib with associated config files (Derek)
        parse array content webmaster@man.amis.com
        preventing multiple posts  <peter@tienderen.demon.nl>
    Re: search script in need of help <shmooth@yahoo.com>
    Re: search script in need of help <shmooth@yahoo.com>
    Re: Spell Checker <jpeterson@office.colt.net>
        Sprite.pm question - mimic a 'DISTINCT' in sql?? <shmooth@yahoo.com>
    Re: SSI commands appear in perl webbrowser <shalabh@pspl.co.in>
        String to Int <dphiffer@orion.ac.hmc.edu>
    Re: String to Int <dwoods@gssec.bt.co.uk>
    Re: what does eq do on lists? <rick.delaney@home.com>
    Re: what does eq do on lists? (William Herrera)
    Re: what does eq do on lists? (Sam Holden)
    Re: What editors are folks using for PerlScript develop <kangas@anlon.com>
    Re: While we are on the subject of tainting.... (I.J. Garlick)
    Re: Why use Python when we've got Perl? (Martijn Faassen)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 18 Aug 1999 06:43:56 GMT
From: Lucas Vogel <lucas7@home.com>
Subject: Re: $1/MINUTE PHONESEX W/ REAL PEOPLE LIKE YOURSELF 65820
Message-Id: <37BA566B.370790FE@home.com>

Why would I want to have phonesex at all, let alone phonesex with
someone like me?

acombatdoc@aol.com wrote:
> 
> Wanna meet someone tonight?
> 
>         CALL NOW:
> 1-800-750-GIRL (4475)
> 
> * Guys: $1 per minute
> * Girls: Totally FREE
> 
> These girls are not phonesex workers. They are horny girls who are on the line cuz it's free phonesex for them. You are free to arrange to meet anyone you meet on this line. Give it a try!
> 
> K0jn8iq/

-- 
--------------------------------------------
Lucas Vogel				 
Brought to you by Caldera OpenLinux 2.2! 
--------------------------------------------


------------------------------

Date: Wed, 18 Aug 1999 03:45:21 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: <== importing hash symbols from one package to another ==>
Message-Id: <37BA2C31.73855AF0@home.com>

[posted & mailed]

Kevin Howe wrote:
> 
> This question is just out of curiosity, can you access a hash in another
> package via it's object reference?  Something similar the following:
> 
> package main;
> $one = new one;
> 
> print $one->%hash{'Color'};
> 
> package one;
> %hash = (Color=>Red,);
> 
> sub new{
>  my ($class) = shift;
>  my ($self) = {};
>  bless ($self, $class);
>  return $self;
> }

If the object being referenced is the hash in question, then you'd
access it the same as with any reference to a hash.

    $one->{'Color'}

However, in this case, you are trying to access %hash in package 'one'
which is not your object.  You can, of course, access it as

    $one::hash{Color}

and that's how it should be accessed.  

You can get at it from your object by using ref to find out what package
your object was blessed into and then using a symbolic reference,

    ${ ref($one) . '::hash'}{Color}

but I'm not sure why anyone would want to do that.

-- 
Rick Delaney
rick.delaney@home.com


------------------------------

Date: Wed, 18 Aug 1999 01:10:31 -0300
From: "Caper" <stevencNOSPAM@nbnet.nb.ca>
Subject: CGI and NT
Message-Id: <7pdbna$nl9$1@garnet.nbnet.nb.ca>

I am trying to run CGI scripts on an IIS NT4 with activeperl installed and
the .PL extension associated to perl.exe in the web server, can anyone help.
Please email stevenc@nbnet.nb.ca




------------------------------

Date: Wed, 18 Aug 1999 17:19:01 +1000
From: nospam-derek@realware.com.au (Derek)
Subject: CGI and param
Message-Id: <MPG.1224ed4d445ee13b989682@news.hutch.com.au>

Hi,

I am sure this is simple, but I have looked in man CGI and can't seem to find 
what I want.

I would like to check if a parameter exists on the command line and if so use 
it, otherwise use a default set in the script itself

use CGI qw/:standard/;

use strict;

$outfile = 'myfile'; #default

if ( param() )
{
  $outFile = param('output');
}

but unfortunately when I run my script with no command line parameters it waits 
for me to enter some name value pairs before it will continue. I know that as 
this example stands that if other parameters exist and 'output' does not that 
$outFile will be undefined but I take care of that, I just did not bother to 
include that in this extract

So is there away to check if there are any parameters, that is what I thought 
if (param())... would do (I got it from man CGI)

Thanks for any help

Derek


------------------------------

Date: 18 Aug 1999 03:09:06 GMT
From: redmondm@yahoo.com (Martin Redmond)
Subject: Re: DBI & Oracle connect problem.
Message-Id: <slrn7rk8tj.dtp.redmondm@mayo.kells>

On 17 Aug 1999 17:36:43 -0700, Parai Ly <lye@table.jps.net> wrote:
>use DBI;
>#dbi:Oracle:TEST123

Quick fix: take the dbname out of the dsn
my $dbh = DBI->connect( 'dbi:Oracle:', 'scott' ....

The problem is your SQL*Net is not set up correctly. If you
run the db server and http server on the same machine you don't
need SQL*Net.

Martin
mr@webcamnow.com

>my $dbh = DBI->connect( 'dbi:Oracle:TEST123',
>                           'scott',
>                           'tiger',
>                           {
>                             RaiseError => 1,
>                             AutoCommit => 0
>                           }
>                         ) || die "Database connection not made: $DBI::errstr";
>
>   my $sql = qq{ CREATE TABLE employees ( id INTEGER NOT NULL, 
>                                          name VARCHAR2(128), 
>                                          title VARCHAR2(128), 
>                                          phone CHAR(8) 
>                                        ) };
>   $dbh->do( $sql );
>
>   $dbh->disconnect();
>


------------------------------

Date: Wed, 18 Aug 1999 08:36:46 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: DBI: prepare, and execute with placeholders - fails.
Message-Id: <37BA628E.5FDBF61@hotmail.com>

leroy@mpi.com wrote:
> 
> hi !
> following the pod of DBI, my usage of prepare/bind_param/execute
> fails.
> 
> at the beginning I had :
> >

<snip>

> >}
> 
> but this would not work!
> always it complains that the 'command is idle'.

It really would help if you could show exactly what the error was and
specifically which line caused it.
I cant see anything wrong with your placeholders per se,

> 
> changing to :
> $sthinsert->bind_param(1,$clusterRep);
> $sthinsert->bind_param(2,$clusterRep);
> $sthinsert->execute();
> 
> provokes the same kind of error.

Richard H


------------------------------

Date: Wed, 18 Aug 1999 05:51:56 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: do '.conf.pl'; syntax in modules
Message-Id: <37ba4972.16250241@news.rmi.net>

Is the config reading syntax of

do 'filename';

considered reasonable form for distributable modules?


---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.


------------------------------

Date: Tue, 17 Aug 1999 22:48:24 -0500
From: greg@apple2.com
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <greg-1708992248240001@lin-dsl2-static-216-026.inetnebr.com>

In article <7pckh9$6dj$1@news.NERO.NET>,
stanley@skyking.OCE.ORST.EDU (John Stanley) wrote:
>Dave Salovesh <darsal@erols.com> wrote:

>> I see that.  I don't know what anyone expects you or me to do about it.

> Ummm, stop defending it for one thing.

If it is not worth defending, how is it worth attacking?

-- 
Nine quadrillion, nine hundred ninety-nine trillion, nine hundred ninety-nine
billion, nine hundred ninety-nine million, nine hundred ninety-nine thousand,
three hundred twenty-eight bottles of beer.  You take one down, pass it around,
nine quadrillion, nine hundred ninety-nine trillion, nine hundred ninety-nine


------------------------------

Date: Wed, 18 Aug 1999 08:24:48 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: Language survey
Message-Id: <FGnJDC.Kz8@csc.liv.ac.uk>

In article <37B9D28C.41C7CEAB@mail.cor.epa.gov>,
David Cassell <cassell@mail.cor.epa.gov> writes:
> The thing I found the most interesting is that, while the
> short-sighted authors of the quiz relegated Perl to the
> procedural-language category only, the number of votes for
> use of OO-language (as opposed to procedural) is far larger
> than the sum of the votes for what they consider OO.  In
> fact, a quick check of the tallies indicates that a lot
> of the Perl-voters had to have marked OO instead of procedural.
> In the words of Randal, "heh".

Very True Dave. That's exactly what I did.


-- 
Ian J. Garlick
ijg@csc.liv.ac.uk                        


------------------------------

Date: Tue, 17 Aug 1999 22:06:41 -0500
From: Mike <kangas@anlon.com>
Subject: Re: launching applications
Message-Id: <37BA2341.F516A63F@anlon.com>

I am not sure I understand where you want the application to run but here are the
2 scenarios that I get from what you may be trying to do.

1) Run an application on the server based on the clients request.
    example: the client wants to delete their account you can use the line `del
ClientAccount.data`;
    and this will work fine on the server.

2) Run an application on the clients machine from the browser.
     example: A client wants to send a text file so you want to open notepad on
their machine...
     Impossible to do with system calls `notepad ClientData.txt`. THIS WILL NOT
WORK.

The reason it runs on your machine is that, well, its on your machine. However
when you are working with the web you have many many many many many many many many
many more restrictions as to what you can do on the clients machine.

Hope this helps.

Helen Sian Ashton wrote:

> I'm trying to use a perl script from a web browser to launch an application. I
> can get the perl script to do everything I want to do if I run it from the DOS
> window - I am using the system command to launch the application. However this
> deosn't work when I run it from the browser, in fact everything but the system
> command seems to work!
>
> I am using a Windows NT PC and have tried this in both Netscape and IE
> browsers. The perl scripts are stored on a UNIX server.
>
> Can anyonw shed some light?
>
> Cheers,
>
> Helen

--
Michael Kangas
Anlon Systems, Inc.
kangas@anlon.com




------------------------------

Date: Wed, 18 Aug 1999 15:08:47 +1000
From: nospam-derek@realware.com.au (Derek)
Subject: Modules in perl/site/lib with associated config files
Message-Id: <MPG.1224cec79786354f989681@news.hutch.com.au>

Hi all,

I want to put a module Xyz.pm in say /perl/site/lib but I have a configuration 
file that I want to associate with this module. Where should this file live, I 
assume in the same path as the module. Or is it a very bad idea to have 
configuration details associated with a module in this way.

Further are there any issues that need to be considered when the module is 
called from a httpd session. Or does the config file just need to be readable 
by the process running the calling script.

Thanks

Derek


------------------------------

Date: Wed, 18 Aug 1999 08:12:59 GMT
From: webmaster@man.amis.com
Subject: parse array content
Message-Id: <7pdpu5$g4l$1@nnrp1.deja.com>

how can i parse array content so that
@params = q->param('bu')

#where bu is the name of a checkbox form

@params will look like ('01','02','03').





Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: Wed, 18 Aug 1999 09:30:11 +0200
From: "Peter van Tienderen" <peter@tienderen.demon.nl>
Subject: preventing multiple posts 
Message-Id: <934961248.8261.0.pluto.d4ee06f0@news.demon.nl>

Hello,
I am quite new to Perl. I am trying to prevent duplicate entries in a bbs,
due to forms being submitted more than once.
I came up with the following chunk of code, which seems to work most of the
time..
Sometimes a get 3-5 duplicates however, with no other messages in between.
I suspect that it has to do with the $oldmessage being read from an old
buffer of the previous dub file??
Any suggestions?
Thank you,
Peter van Tienderen


 $dubfile = $pbbs."dub";
 open(DUB, "+<$dubfile") || die "Content-type: text/plain\n\n Could not open
$dubfile\n";
 flock(DUB,2)  ||  die "Content-type: text/plain\n\n Could not lock
$dubfile\n";
 $oldmessage = <DUB>;
 $newmessage = $FORM{'afzender'}.$FORM{'inhoud'};
 &notpublished if $oldmessage eq $newmessage;   # and exit
 seek(DUB, 0, 0);   # probably not needed..
 truncate(DUB, 0);
 print DUB $newmessage;
 close DUB;
# and continue adding the message




------------------------------

Date: Wed, 18 Aug 1999 07:34:34 GMT
From: Shmooth <shmooth@yahoo.com>
Subject: Re: search script in need of help
Message-Id: <37BA60D5.9F21FD9A@yahoo.com>

one of the FAQ's floating around mentions how to install Perl modules in your
own (user) directory at your ISP.  Basically you copy the perl module somewhere
into your directory, then 'import/use' it with some syntax.  I think I saw it on
one of the FAQ's listed at www.perl.com -> FAQ's.


> >
> > does this mean all is lost and im doomed because i cant use the the
> > LWP/Simple.pm.
> > or is there another way?
> E-mail your ISP with the module attached and ask for it to be installed.
> LWP is a pretty common module so there should not be any problem.



------------------------------

Date: Wed, 18 Aug 1999 08:01:06 GMT
From: Shmooth <shmooth@yahoo.com>
Subject: Re: search script in need of help
Message-Id: <37BA670D.A4C1C71B@yahoo.com>

http://www.perl.com/pub/doc/FAQs/cgi/perl-cgi-faq.html

Note, if you did not build Perl on your system or do not have access to install
these modules with the other Perl library files, you can still use it by placing the
module in a convenient place and adding the following to your script:

                           BEGIN {
                               unshift (@INC, "/your/dir/favorite/place");
                           }


Shmooth wrote:

> one of the FAQ's floating around mentions how to install Perl modules in your
> own (user) directory at your ISP.  Basically you copy the perl module somewhere
> into your directory, then 'import/use' it with some syntax.  I think I saw it on
> one of the FAQ's listed at www.perl.com -> FAQ's.
>
> > >
> > > does this mean all is lost and im doomed because i cant use the the
> > > LWP/Simple.pm.
> > > or is there another way?
> > E-mail your ISP with the module attached and ask for it to be installed.
> > LWP is a pretty common module so there should not be any problem.



------------------------------

Date: Wed, 18 Aug 1999 08:22:51 GMT
From: Jon Peterson <jpeterson@office.colt.net>
Subject: Re: Spell Checker
Message-Id: <v3uu3.149$u07.1284@news.colt.net>

dgold1@my-deja.com wrote:
> I need to spell check a text box control on a form. Is there a PERL
> solution avaliable that I can run on the Unix server?

A quick look at CPAN doesn't show anything very suitable.
If you have 'spell' on your unix system, you could shell out to that to check
words:

$misspelled = `echo "$inputstring" |spell`; # spell returns words that are 
						# misspelled
&complain() if $misspelled; # do something with the results




------------------------------

Date: Wed, 18 Aug 1999 08:06:16 GMT
From: Shmooth <shmooth@yahoo.com>
Subject: Sprite.pm question - mimic a 'DISTINCT' in sql??
Message-Id: <37BA6844.C2C22E9B@yahoo.com>

It seems that 'Sprite.pm' (use SQL syntax on a flat-file db) doesn't
support the 'DISTINCT'  SQL keyword.  Does someone have a workaround?  I
haven't contacted the author.

Does this question belong in comp.lang.perl.modules?



------------------------------

Date: Wed, 18 Aug 1999 14:12:52 +1000
From: "Shalabh Chaturvedi" <shalabh@pspl.co.in>
Subject: Re: SSI commands appear in perl webbrowser
Message-Id: <7pf02t$69t$1@news.vsnl.net.in>

SSI is on the server side. The webserver has to be configured to execute the
SSI, not the web-browser.

<one1999@my-deja.com> wrote in message news:7pcm32$mhn$1@nnrp1.deja.com...
> Hi,
>
> I am programming a small perl webbrowser to measure the time of the
> parts in the page downloading process (DNS lookup, first byte, rest of
> the page etc.), but I see the SSI commands as they are. They are not
> executed.
>
> By the way the same happens when I download a page with telnet on port
> 80.
>
> Do you know what I have to change to see the HTML code like an ordinary
> browser?
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



------------------------------

Date: 18 Aug 1999 08:00:33 GMT
From: "Daniel M. Phiffer" <dphiffer@orion.ac.hmc.edu>
Subject: String to Int
Message-Id: <7pdp71$qqt$1@nntp1.interworld.net>

I have a beginner's question: how do I convert from a string to an
int? (i.e. "32" compared to 32) Thanks.

-Dan

dphiffer@hmc.edu
http://i.am/phiffer/


------------------------------

Date: Wed, 18 Aug 1999 09:21:44 +0100
From: Daniel Woods <dwoods@gssec.bt.co.uk>
Subject: Re: String to Int
Message-Id: <37BA6D17.CBFFCE99@gssec.bt.co.uk>

You don't have to. Just start using your numeric variable as a string
and the conversion will be done behind the scenes.

Danny.

"Daniel M. Phiffer" wrote:

> I have a beginner's question: how do I convert from a string to an
> int? (i.e. "32" compared to 32) Thanks.
>
> -Dan
>
> dphiffer@hmc.edu
> http://i.am/phiffer/

--
--------------------------------------------------
Daniel Woods,
BT Glasgow Engineering Centre
--------------------------------------------------
The views expressed here are mine and do not
necessarily reflect those of BT




------------------------------

Date: Wed, 18 Aug 1999 04:05:51 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: what does eq do on lists?
Message-Id: <37BA30FF.948BEE83@home.com>

[posted & mailed]

Sam Holden wrote:
> 
> It does a string comparison of @a[0..3] and @b.
> 
> To do so it first convert @a[0..3] and @b to strings.
 
I'm sure you know this, Sam, but I just want to point out that @a[0..3]
in scalar context does not return the number of elements in the
slice--just in case someone reads your example that way.

> @a = (1,2,3,4,5,6,7,8,9,10);

Add this

  @a = reverse @a;

> @b = (1,2,3,4);
> print "match" if (@a[0..3] eq @b);
> 
> Will output match...

and now it won't print "match".

@a[0..3] is a list ($a[0], $a[1], $a[2], $a[3]), not an array, so in
scalar context it returns $a[3], which just happens to be 4 in your
example.  @b is an array so it returns its number of elements in scalar
context which is also 4.

-- 
Rick Delaney
rick.delaney@home.com


------------------------------

Date: Wed, 18 Aug 1999 05:46:43 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: what does eq do on lists?
Message-Id: <37ba4752.15705811@news.rmi.net>

On Tue, 17 Aug 1999 20:41:07 -0500, "John M. Dlugosz" <john@dlugosz.com> wrote:

>The expression
>    @a[0..3] eq @b
>So what does it do, if not compare all four strings?  It produces undef in
>the case I expect true, when b has four elements that match the first four
>elements of a.

same as (scalar @a[0..3]) eq (scalar @b) ie compares the number of elements in
the arrays.

look up join in perlfunc


---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.


------------------------------

Date: 18 Aug 1999 06:19:56 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: what does eq do on lists?
Message-Id: <slrn7rkk5c.708.sholden@pgrad.cs.usyd.edu.au>

On Wed, 18 Aug 1999 04:05:51 GMT, Rick Delaney <rick.delaney@home.com> wrote:
>[posted & mailed]
>
>Sam Holden wrote:
>> 
>> It does a string comparison of @a[0..3] and @b.
>> 
>> To do so it first convert @a[0..3] and @b to strings.
>
>@a[0..3] is a list ($a[0], $a[1], $a[2], $a[3]), not an array, so in
>scalar context it returns $a[3], which just happens to be 4 in your
>example.  @b is an array so it returns its number of elements in scalar
>context which is also 4.

I found that out when I was testing... but then promptly forgot about
it and didn't mention it. I should have since it had me fooled for a minute
or ten.

But this begs the question why is it called an 'array slice'.

-- 
Sam

You are bordering on ridiculous if you think you need to support your
premises.  Such an argument is an infinite regression.
 	--George Reese in <wv0O1.1521$Ge.4809664@ptah.visi.com>


------------------------------

Date: Tue, 17 Aug 1999 22:16:41 -0500
From: Mike <kangas@anlon.com>
Subject: Re: What editors are folks using for PerlScript development?
Message-Id: <37BA2599.2F5DD3A1@anlon.com>

my editor of preference is vi. there is an initial learning curve that many
people absolutely hate and is why many don't and won't use it. (WUSSIES  :o)
). but when you take the time to learn it.... it is much much faster than any
editor that uses a mouse. HANDS DOWN. Plus if you ever have to use telnet to
repair a program I'd like to see anyone bring up a visual editor with that
one. FTPing the file back and forth is a cop out.

Sorry if I offend but Vi just rox.


Ken Snyder wrote:

> What editors are folks using for PerlScript development under Windows?  I
> have had some success with Homesite but would like to use Visual Interdev.
> Is there anyway to get Interdev to parse Perl?  Is there a better editor I
> should use instead?
>
> ken

--
Michael Kangas
Anlon Systems, Inc.
kangas@anlon.com




------------------------------

Date: Wed, 18 Aug 1999 08:50:49 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: While we are on the subject of tainting....
Message-Id: <FGnKKp.LC0@csc.liv.ac.uk>

In article <SViu3.7267$x04.408766@typ11.nn.bcandid.com>,
pacman@defiant.cqc.com (Alan Curry) writes:
>>For instance I do
>>
>>   my @ret = `$prog $opts 2>$errout`;
>>
> Here's the important part:
> 
>                exec 'myprog', 'arg1', 'arg2'
>                    or die "can't exec myprog: $!";

I had figured that out, but my problem is I have to know exactly what
'myprog' returns on both STDOUT while throwing away STDERR (most of the
time) ocassionally I need what's on STDERR as well.

MY denseness is, everything seems to imply that you can't do

	my @ret = exec 'myprog', 'arg1', 'arg2' or die "can't exec myprog: $!";

I have never seen this done (not looked that hard I must admit) and the
perlfunc man page says this in the first 2 lines on exec:-

		The exec() function executes a system command AND NEVER
		RETURNS - use system() instead of exec() if you want it to
		return.

But as I said the part on system says to use `` to capture output.

Round and round the garden.....

I am very confused. I think I will just try it and see, don't hold much
hope though.

>   exec $prog, split(/\s+/, $opts) or die "exec failed: $!";
> 
> That doesn't take care of your 2>$errout though. To do that, you should put
> before the exec:

Mostly I put /dev/null in $errout but sometimes it needs to be 2>&1,
standard unix stuff. Why wouldn't '2>/dev/null' work as an argument to
'myprog' in the exec call?

> Now you've converted your original to a fork, open, and exec (and a read loop
> in the parent process), and you can begin the actual untainting. To do that
> you need to figure out which variable is tainted - $prog, $opts, or $errout.

Oh it's deffinitely $opts there is noway on Gods earth I am letting a user
decide on the value of $prog, or $errout for that matter. Don't have much
choice on $opts though. I already pass all relevant values that go into
making up $opts through a series of regexes to make sure all possible
problem charaters will be escaped so the shell wont complain. (Actually
it's the opposite, it gets escaped if I don't think it's ok, much safer,
which means mostly only \w and a few others get through untouched).

I am begging to think this would all be much easier via an xs extension,
probably faster as well. Now if only I could get the first example in the
perlxs tutorial manpage to work I might get somewhere.

Thanks Alan, at least you confirmed my reasoning on what was going on.

-- 
Ian J. Garlick
ijg@csc.liv.ac.uk


------------------------------

Date: 18 Aug 1999 07:45:19 GMT
From: m.faassen@vet.uu.nl (Martijn Faassen)
Subject: Re: Why use Python when we've got Perl?
Message-Id: <7pdoaf$b8c$1@newshost.accu.uu.nl>

In comp.lang.perl.misc Ian Clarke <I.Clarke@strs.co.uk> wrote:

[who was this?]
>> The problem in comp.lang.perl.misc is not the beginners -- it is
>> the regulars.
[snip Ian's response]

Come on guys, this is not useful, not nice, and not true. Yes, of course
people snap, and sometimes they make the mistake of not being diplomatic,
but *everybody* makes this mistake, definitely including Ian Clarke with
this very stupid title he chose. :)

Regards,

Martijn



------------------------------

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 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.  

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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

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 571
*************************************


home help back first fref pref prev next nref lref last post