more useful options | |
PerlMonks |
Re: Unusual variable declarationby choroba (Cardinal) |
on Nov 02, 2019 at 21:46 UTC ( [id://11108263]=note: print w/replies, xml ) | Need Help?? |
The first line declares an alias $var for the global variable $var in the current package. The second line makes it an alias of the $var variable in the main package. Therefore, it only makes sense to use this in a package different to main. For example:
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|