in reply to using variables as functions

just for the sake of completeness, i'd like to add that you could also use the following notation for takshaka's solution:
my $var = \&funcname; $var->();