#file: /perl/site/lib/Foo.pm package Foo; use strict; use warnings; sub bar { return "BAR"; } 1; #file: test.pl use strict; use warnings; my $i = 0; if ( $i ) { use Foo; } print Foo::bar; #prints "BAR"
In reply to Re^3: Using a module more than once
by holli
in thread Using a module more than once
by kwaping
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |