my $foo = "long string\n"; bar( \$foo ); # pass reference sub bar { my $fooref = shift; print $$fooref; # dereference } __END__ long string
Check out perlref and perlreftut.
Liz
In reply to Re: Scope Between global and my
by liz
in thread Scope Between global and my
by SkipHuffman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |