in reply to As Efficient as Possible
sub intersectPlus { my( $a, $b, $c, $d ) = @_; my %a; undef @a{ @$a }; my %b; undef @b{ @$b }; push @{ exists $a{ $_ } ? $d : $c }, $_ for keys %b; push @$d, @$c; return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: As Efficient as Possible
by mr_p (Scribe) on Apr 02, 2010 at 21:49 UTC | |
by BrowserUk (Patriarch) on Apr 02, 2010 at 22:11 UTC | |
by mr_p (Scribe) on Apr 02, 2010 at 22:24 UTC |