Jun 22, 2008

How to call anonymous sub-routine

#!F:\Perl\bin\perl -w
use strict;

#This is called anonymous subroutine , since no name is given to that.
my $hello = sub { print "Helloooooo" };
print $hello->();

No comments:

Post a Comment