my $savefile = new FileHandle("xxx.ptysav", "r"); my $lines = join("",($savefile->getlines())); my $result = eval $lines; # <- here is the +eval close ($savefile);
That looks really dangerous!
Imagine someone changing xxx.ptysav to contain $_=`rm -rf /`;. That would be a bad day for you.
See also:
Alexander
In reply to Re: trouble with packages/eval/variable-scoping
by afoken
in thread trouble with packages/eval/variable-scoping
by Ratazong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |