Name "main::x" used only once: possible typo at ... warning.
But putting the require into a begin block really helps. 8)
> cat mod.pm tren prog.pl tren; perl prog.pl $x="X"; 1; ------------------------ use strict; use warnings; #our $x; #BEGIN { require mod; #} print $::x; ------------------------ Name "main::x" used only once: possible typo at prog.pl line 10. X
Cheers Rolf
In reply to Re^4: Variables in a single file
by LanX
in thread Variables in a single file
by northwestdev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |