print $tied->(5), $/; $r->{subref} = sub { return 2 * $_[0] }; # This is a new anonymous subref { print $tied->(10), $/; }