| August 1999 | Return to the Perl Hardware Store | Slide #20 |
Since the stringized representation is faithful, you can use a hash to unstringize:
sub remember {
my ($reference) = @_;
$true_value{$reference} = $reference;
}
The value is the real reference; the key is the stringized version
To unstringize:
sub unstringize {
my ($stringized) = @_;
return $true_value{$stringized};
}
| Next | ![]() |
Copyright © 1999 M-J. Dominus |