http://qs1969.pair.com?node_id=521996


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.