in reply to trouble with packages/eval/variable-scoping
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: trouble with packages/eval/variable-scoping
by eyepopslikeamosquito (Archbishop) on Aug 29, 2024 at 23:32 UTC | |
Re^2: trouble with packages/eval/variable-scoping
by LanX (Saint) on Aug 30, 2024 at 10:38 UTC | |
by hippo (Archbishop) on Aug 30, 2024 at 11:28 UTC | |
by LanX (Saint) on Aug 30, 2024 at 12:39 UTC | |
by hippo (Archbishop) on Aug 30, 2024 at 13:12 UTC | |
by LanX (Saint) on Aug 30, 2024 at 13:41 UTC | |
|