this works: #!/usr/bin/perl -w use strict; print "b in main: $b"; a(); #---------------------- BEGIN{ our ($b); my ($fn) = @ARGV; $b = `cat $fn`;
sub a { print "b in a: $b"; } } this doesn't: #!/usr/bin/perl -w use strict; my $b = `cat $fn`; print "b in main: $b"; a(); #---------------- BEGIN{ our ($fn) = @ARGV; my $b = `cat $fn`; sub a { print "b in a: $b"; } } getting: Global symbol "$fn" requires explicit package name at ./v line 3 where line 3 is: my $b = `cat $fn`; is it the case that using a variable as a container for a command line argument, creates a problem for 'use strict'? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>