in reply to Re: Variables in variable names
in thread [untitled node, ID 216639]

$letter = 'Oops'; $number = ";print 'You have been hacked!';"; my $result = eval "\$$letter$number";

Eval (and symbolic references) are dangerous - that print could have been rf -rm /*. Just don't do it.... Typo intentional.

cheers

tachyon

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

Replies are listed 'Best First'.
Re: Re: Re: Variables in variable names
by Courage (Parson) on Dec 01, 2002 at 09:08 UTC
    I am absolutely agree with you
    Besides, /perlfaq\d/ warns about huge sequrity holes in such situations.

    But I tried to provide Samn with a syntax he was searching, and after that to advice a better and safer way to solve his task.

    Best wishes,
    Courage, the Cowardly Dog