foreach $e (@a, @b) { $union{$e}++ && $isect{$e}++ }
@union = keys %union;
@isect = keys %isect;
|
< Use Hashes for Sets Use Hashes for the First Time > Table of Contents | Page 14 |
YAPC 19101,
June 2001 Perl Idioms Nathan Torkington |