in reply to Re3: Best way to handle 'commands'
in thread Best way to handle 'commands'

One of the fun things about using typeglobs, is that you can use it to figure out which subs are defined in a given package. So, by doing something like this, you can skip the entire dispatch table(of course this wont work under use strict qw(refs);:

for (@ARGV){ if(*{$_}{CODE}){ &{*{$_}}; } else { print STDERR "Dont know about $_\n"; } }

Goldclaw