my ($a, $b); $a = \$b; #my $a='b'; $b = '1'; #my $b='1'; $a = '2'; #$$a='2'; # Wrong, $$a would dereference $a, but you failed +to create a proper ref in first place. # that's why 'use strict' complained. Nothi +ng should have printed unless you # defeated 'use strict' in which case perl g +uesses that you are trying to # make a reference and correctly prints '1'. print $b; # I assume you are experimenting with references?
In reply to Re: can't use string as a SCALAR ref while strict refs
by Anonymous Monk
in thread can't use string as a SCALAR ref while strict refs
by justinNEE
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |