to avoid the if ($command eq "foo") { &foo } elsif (...) thing. I think I picked it up from Jim Winsteadif (exists $commands{$command}) { my ($result) = eval "&$command"; ... }
- ask
-- ask bjoern hansen, http://ask.netcetera.dk/ !try; do();
In reply to Re: Would you use 'goto' here?
by ask
in thread Would you use 'goto' here?
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |