SPUG:Minimal Typing for Selections; ideas?

Tom Legrady legrady at earthlink.net
Mon Jun 9 11:35:21 CDT 2003


On Mon, 2003-06-09 at 11:44, Tim Maher wrote:
> I landed on the
> 	"@choices" =~ /regex/
> idea in a moment of inspiration, although I don't think I've ever
> seen anybody else do that in Perl code.  Which probably means
> there's a better way. 

Of course, there's the possibility that this is the better way. Every
"better way" has a first use.

But what's the purpose of the loop? You're checking all the options at
once in "@choices" =~ /regex/, and then checking it (scalar @choices)
times, thanks to the loop. Or am I missing something?

Tom




More information about the spug-list mailing list