You'd have to try a lot harder for me to think you were being rude...with apologies to Douglas Adams, I eat ruder things than you with my breakfast cereal :)
The PBP portion of my post was really the IO::Prompt stuff. That early in the morning, I was confusing PBP and "Perl 6 Now" when I pulled in the Switch module. Thanks for pointing it out, I shouldn't have given the impression that the Switch idea was a Damian recommendation.
As to your other comment, I'm dragging this morning, and am not seeing what you're suggesting. Could you enlighten me?
Thanks,
~jeff
| [reply] |
What I meant was, writing "h|hs|hsb|hsbn" yourself is tedious. Better to have Perl generate that for you:
my %abbrevs = map {
my $word = $_;
($word => join("|", map { substr($word, 1, $_) } 1 .. length($word)
+}))
} qw( hsbn admin ... );
| [reply] [d/l] [select] |
Thanks. I agree it seemed tedious, but no better method was jumping to mind. I like that solution!
| [reply] |