Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: passing variables

by swkronenfeld (Hermit)
on Jan 09, 2006 at 17:00 UTC ( #521996=note: print w/replies, xml ) Need Help??


in reply to passing variables

Variables enclosed in single quotes don't get interpolated. So you need to enclose in double quotes, but escape the ampersand on the array.

system ("tremove \@host:$ep");

Replies are listed 'Best First'.
Re^2: passing variables
by radiantmatrix (Parson) on Jan 09, 2006 at 21:30 UTC

    It's worth pointing out that you shouldn't use variables in system calls without knowing for sure what the variables contain. If you aren't positive that what's in $ep is safe, you are taking a huge risk.

    You should read the section on Taint mode and @INC in perlsec (and, in fact, all of perlsec is good reading) before letting that line into a public/production environment.

    Yeah, I'm paranoid -- once bitten, twice shy and all that.

    <-radiant.matrix->
    A collection of thoughts and links from the minds of geeks
    The Code that can be seen is not the true Code
    "In any sufficiently large group of people, most are idiots" - Kaa's Law
Re^2: passing variables
by rudeb0y (Novice) on Jan 09, 2006 at 17:05 UTC
    thx...that worked. I knew it wuz gonna be simple.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2022-08-08 08:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?