- or download this
% perl -le 'use strict; $x = 1; print $x'
Global symbol "$x" requires explicit package name at -e line 1.
...
Execution of -e aborted due to compilation errors.
% perl -le 'use strict; $main::x = 1; print $::x'
1
- or download this
use strict;
...
}
# ... code under strict
- or download this
use strict;
sub foobar { print "hello from foobar\n" }
...
}
__END__
hello from foobar