in reply to Subroutine as an lvalue?

here's the only copy of the 5.6 perlsub man page i could find online at ActiveState.

see the Lvalue subroutines section.

another cool thing along these lines is using builtins like substr as lvalues. here's an example (i think it should work with 5.005_03 or higher, possibly earlier versions):

$foo = "_123_"; substr($foo, 1, 3) = "bar"; print "$foo\n";
_bar_