in reply to Re(ALL): Putting it together
in thread H of A optimization
I'd rather say:
--my (%edgeHash,@alreadySeen); while(<STDIN>){ # simpler regexp if(/(\d+)\D+(\d+)/){ # don't use '$a' and '$b'! # and don't quote "$vars" # in fact you can keep $1 and $2 push @{$edgeHash{$1}}, $2 unless $alreadySeen[int($2)]++; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re(3): Putting it together
by Arien (Pilgrim) on Aug 30, 2002 at 21:30 UTC |