- or download this
for(0..100){
my $x = $tied;
print $x->(5), "\n";
}
- or download this
print $tied->(5), $/;
{
print $tied->(10), $/;
}
- or download this
print $tied->(5), $/;
$r->{subref} = sub { return 2 * $_[0] }; # This is a new anonymous sub
+ref
{
print $tied->(10), $/;
}
- or download this
sub FETCH {
my $r = shift;
...
return $r->{subref} = $r->{subref};
}