- or download this
# file foo.pl
use strict;
...
}
print __FILE__,' ',__LINE__,' ',__PACKAGE__,":: \$foo is '$foo'\n";
print __FILE__,' ',__LINE__,' ',__PACKAGE__,":: \$Foo::foo is '$Foo::f
+oo'\n";
- or download this
# file bar.pl
use strict;
...
package Bar;
print __FILE__,' ',__LINE__,' ',__PACKAGE__,":: \$foo is '$foo'\n";
- or download this
#!/usr/bin/perl
...
require 'bar.pl';
print __FILE__,' ',__LINE__,' ',__PACKAGE__,":: \$foo is '$foo'\n";
- or download this
foo.pl 8 Foo:: $foo is 'foo'
foo.pl 11 Bar:: $foo is 'foo'
...
bar.pl 12 Foo:: $foo is 'foo'
bar.pl 15 Bar:: $foo is 'foo'
main.pl 8 main:: $foo is 'bar'