in reply to Choosing between multiple closures
What do you suppose this does? when ( /INCREMENT/ ) { \&increment( @_ ) }
How about \&increment( @_ )
$ perl -e " sub f { sub { @_ } } print \&f( 6,6,6 ); " REF(0x3f9abc) $ perl -e " sub f { sub { @_ } } print &f( 6,6,6 ); " CODE(0x3f9b9c)
So, if you're trying to return a reference, don't take a reference to that reference, simply return the reference
return increment( @_ );
|
|---|