in reply to Variables out of scope using END and Error.pm
From what I can tell it seems to be a problem related to the CHECK/BEGIN/INIT/END block.
This for example does not work either: perl --wle '$,=" & ";my @c=1..2;sub xyz (&) { my $z=shift;$z->(); &$z(); &$z; } END { xyz { print "X: ", @c; }; }', but adding @c; to it then you get the warning 'useless use of private array in void context'... The keyword in this sentence would be private.
I do not know what exactly this means...
Update: I should have know that I would get downvoted... A question that actually seemed intresting and for which I actually tested some code... That just can't be allowed?
|
|---|