in reply to Re: minimal response program code problem
in thread minimal response program code problem

I quite often use a hash splice in that context:

my %Goodwords; @Goodwords{@goodWordsList} = (1) x @listOfGoodwords;

TIMTOWTDI and YMMV. ;-)


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^3: minimal response program code problem
by johngg (Canon) on Dec 05, 2006 at 23:33 UTC
    Nice. GrandFather ++

    I've seen something like this in books a couple of times recently but it hasn't registered yet in my grab-bag of handy tools. Mainly because I still think of x as just a string multiplier and not as a list multiplier as well. I need to use it a couple of times so that it springs to mind on cue.

    Cheers,

    JohnGG