in reply to does perl have a concept of "int main()"? (variable scoping question)
nope Perl is not Python, it has lexically scoped variables.
Use my $var to declare pricate variables which are limited to the block-scope resp. the filescope at maximum.
Use our $var to declare variables in the local package which could be accessed from other namespaces by full declaration like $package::var.
Cheers Rolf
( addicted to the Perl Programming Language)
PS: see also this code example
|
|---|