in reply to Getopt::Long

Why not just ignore the unnecessary parts?
my $command = shift; %commands = ( v => \&view, a => \&add, se => \&set, sh => \&show ); ($command) = grep $command =~ /$_/, keys %commands; &{$commands{$command}} if exists $commands{$command};


If we didn't reinvent the wheel, we wouldn't have rollerblades.