Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Newbie Tainted glob question

by tachyon (Chancellor)
on Oct 24, 2001 at 20:43 UTC ( [id://121179]=note: print w/replies, xml ) Need Help??


in reply to Newbie Tainted glob question

You can get around using glob like this:

my $dir = '/var/www/htdocs/'; opendir DIR, $dir or die "Can't open dir $dir $!\n"; my @entries = grep { /\.html$/ } readdir DIR; closedir DIR; print "@entries";

This said you generally need to set $ENV{'PATH'} to a known safe value to pacify taint with a line like:

$ENV{'PATH'} = '/bin:/usr/bin';

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://121179]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-19 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found