in reply to variable function thingy

Like Ovid, but with a twist:
# Define a list of 'actions' by listing function names my %function = map { $_ => \&$_ } qw[ post read default ]; # ... my $action = something(); # Wherever you get it $function{$action}->(@somestuff); # Pass any parameters
You'll want to check that $function{$action} is defined before using it, of course.

This code works with both strict and warnings engaged.