develooper Front page | perl.perl5.porters | Postings from July 2008

Re: Creative and *routine* use of so-called "magic" ARGV (was [perl #2783] Security of ARGV using 2-argument open)

Thread Previous | Thread Next
From:
David Nicol
Date:
July 29, 2008 06:04
Subject:
Re: Creative and *routine* use of so-called "magic" ARGV (was [perl #2783] Security of ARGV using 2-argument open)
Message ID:
934f64a20807290604w5d72a366kd4bddf025c619d18@mail.gmail.com
Whoever is compiling the module of handy preprocesses for ARGV may
wish to consider

BEGIN { @ARGV = map  "< \Q$_\E"  @ARGV }



as in

cat <<EOM > SafeMagicalFootball.pm
package SafeMagicalFootball;

sub import { @ARGV = map  "<\Q$_\E" @ARGV }

1;
EOM

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About