in reply to Scope Between global and my

References!

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