# suppose I have the above commands (view, add, edit, set ,show) # since no command except 'add' starts with the letter 'a', I want that both will work myshell> add -name test -value 40 # first myshell> a -name test -value 40 # second # in the GetOptions() function, I only have for the 'add' command, the followings: if ($command eq 'add') { if (GetOptions(\%hash, 'name=s', 'value=i')) { &doSomething(); } } elsif ($command eq 'edit') { ... } ...