However it is not visible to another package.
Be careful here. Lexical variables don't care about packages, lexicals and packages are completely orthogonal concepts.
use strict; my $x = 42; { package OtherPackge; print $x, "\n"; }
Lexical variables are visible within the current block, and each file is implicitly enclosed in a block.
In reply to Re^2: Checking the command line arguments
by moritz
in thread Checking the command line arguments
by newbie01.perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |