$Bill Luebkert wrote: > Chris Wagner wrote: > > >>I think this will do what u want. >> >>foreach $i ( grep($something, $maybeBiggerOriginalArray) ) { $hash{$i} = 1 } > > > Or maybe: > > my %hash = map { $_ => 1 } grep /$something/, @array;
One more using the hash slice suggestion: my %hash2; @hash2{grep /$something/, @array} = (1) x @array; -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs