Mega Code Archive

 
Categories / Perl / Subroutine
 

Using - operator to call a subroutine by its reference

$codereference = sub {print shift}; $codereference->("Hello!\n");