Chas. Owens wrote:
Gunnar Hjalmarsson wrote:
Chas. Owens wrote:
On Jan 23, 2008 10:07 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
Along these lines, can someone explain to me why
use strict 'vars';
my $name = 'data';
print foreach @$name;
produces no error, when
use strict 'vars';
print foreach @data;
does?
snip
Because use strict 'vars' runs in the compile phase and the symbolic
reference is not resolved until the run phase.
Don't think so, Chas. It's
use strict 'refs';
that captures symbolic references, not 'vars'.
He was referring to the fact that @data is not fully qualified and has
not been declared (and would generate an error but for the fact that
"vars" runs at compile time), not the fact that it is a symbolic
reference.
I realize now that I misunderstood the question. Thanks for explaining!
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/