perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
;-)
See our. Variables declared with our aren't global.
The only global variables in perl are the 'special' variables, e.g. $_. But with these, "global" means only that the symbol is available everywhere, without any previous declaration - but the actual value accessible through that symbol is subject to localizing and aliasing.
The documentation for our stresses within the current scope - and a block boundary is a scoping boundary.
Say use vars qw($text) to have a package global, or use ${^_text} to have a really real global (the symbol is bound to the package main, though).
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: Use of a global scalar
by shmem
in thread Use of a global scalar
by Grey Fox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |