Granted this still has the same problem as the initial code, but it's twice as fast and saves memory over your speedier (20xOriginal) solution. It also has the side-effect of effectively uniq-ing @betas. If you don't like that replace the outter grep with map.foreach my $alphabeta ( my $z; grep { $z = $_; grep { $z eq $_ } @alphas } @betas ){ # do something }
--
perl -pew "s/\b;([mnst])/'$1/g"
In reply to Re: (All roads lead to Rome) Re: Re: C vs perl
by belg4mit
in thread C vs perl
by mandog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |