Call a subroutine through its reference : Subroutine Reference « Subroutine « Perl






Call a subroutine through its reference

   

sub subroutine
{
    print "Hello!\n";
}
$codereference   = \&subroutine;
&$codereference;

   
    
    
  








Related examples in the same category

1.Using -> operator to call a subroutine by its reference
2.Call subroutine with parameter by using its reference
3.References to subroutines.