in reply to Re^5: Multiple uses of (?{ code }) do not appear to be called
in thread Multiple uses of (?{ code }) do not appear to be called

See, this is why ourperl is so confusing :-)

You are bitten by the magic of $a and $b:

#!/usr/bin/perl -l use strict; { local our $x = "A" } { our $y = "B" } print "x=$x"; print "y=$y"; __END__ Variable "$x" is not imported at our2.pl line 7. Variable "$y" is not imported at our2.pl line 8. Global symbol "$x" requires explicit package name at our2.pl line 7. Global symbol "$y" requires explicit package name at our2.pl line 8. Execution of our2.pl aborted due to compilation errors.

Replies are listed 'Best First'.
Re^7: Multiple uses of (?{ code }) do not appear to be called
by bsdz (Friar) on Dec 29, 2006 at 22:09 UTC
    Yes, my mistake, you are completely right. Localizing $a is a common thing to do but not the way I put it.