Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The output is:#!/usr/local/bin/perl5.00503 @foo_list = (1,2,3); my @bar_list = (4,5,6); my $src = "foo"; my @list = @{"${src}_list"}; print "length = " . scalar @list . "\n"; $src = "pnotes"; @list = @{"${src}_list"}; print "length = " . scalar @list . "\n";
What's the deal? Why do only non-my variables work?length = 3 length = 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "my" variables don't work with symbolic
by davorg (Chancellor) on May 18, 2001 at 12:31 UTC | |
|
Re: "my" variables don't work with symbolic
by stephen (Priest) on May 18, 2001 at 08:11 UTC |