A soft reference holds a variable's name, while a hard reference holds its memory address. When you dereference a soft reference, you search for a name in the symbol table. When you dereference a hard reference, you fetch the variable at that address.$foo = 23; $soft = 'foo'; # soft reference $hard = \$foo; # hard reference print "soft=$$soft, hard=$$hard\n";
In reply to Re^4: RFC: Tutorial: use strict; now what!?
by educated_foo
in thread RFC: Tutorial: use strict; now what!?
by Xiong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |