in reply to Re: variable function thingy
in thread variable function thingy
sub test { print "Hello world!\n"; } my $subroutine = "test"; &{$subroutine};
The caveat to this approach is that it breaks strict refs unless the $subroutine scalar is evaluated (eg. eval $subroutine).
Update - Check out the nifty example from broquaint in this thread here
perl -e 'print+unpack("N",pack("B32","00000000000000000000000111010010")),"\n"'
|
|---|