in reply to Reading and producing variable lists (w/o hashes!)
And unless you fully control the input, the security holes are wide enough to drive a large dump truck through.while (<DATA>) { eval $_; } print "$apple, $pear, $orange\n"; __DATA__ $apple = 'green'; $pear = 'sweet'; $orange = 'healthy';
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading and producing variable lists (w/o hashes!)
by bingohighway (Acolyte) on May 01, 2009 at 10:59 UTC |