- or download this
sub test{ print @_; }
...
$coderef->( 'a different argument' );
# Would print 'this is the argument'!!
- or download this
sub test{ print 'this is the argument'; }
...
$coderef->( 'a different argument' );
# Prints 'this is the argument'!!
- or download this
my $coderef = sub{ print @_; };
$coderef->( 'Some', 'args' );
# Prints 'someargs'