Thanks a lot, LanX!
So I changed the sub loadP to the following, and it works :-)
Rata (having learned something today)
sub loadP
{
$gold = 0; # <--- new
my $savefile = new FileHandle("xxx.ptysav", "r");
my $lines = join("",($savefile->getlines()));
my $result = eval $lines;
close ($savefile);
}
In reply to Re^2: trouble with packages/eval/variable-scoping
by Ratazong
in thread trouble with packages/eval/variable-scoping
by Ratazong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |