in reply to [ooperl] calling reference to a annonymous sub
From what I understand about packages, namespaces and scope, you're missing two things:
Trying the same with my will result in a warning when you try to print an uninitialized variable.% perl -wle'package foo; our $bar = "10"; package main; print $foo::ba +r' 10
Hope this helps.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: [ooperl] calling reference to a annonymous sub
by tphyahoo (Vicar) on Nov 07, 2005 at 09:45 UTC | |
by BUU (Prior) on Nov 07, 2005 at 10:29 UTC |