tdevil76 has asked for the wisdom of the Perl Monks concerning the following question:
for my $location (@locations){ next if ($location eq 'HEADING'); my ($country,$state,$city) = split /,/, $location; push @countries, $country; push @states, $state; push @cities, $city; } @countries = uniq @countries; @states = uniq @states; @cities = uniq @cities;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: cleaner code ....
by ikegami (Patriarch) on Dec 06, 2006 at 23:25 UTC | |
|
Re: cleaner code ....
by Joost (Canon) on Dec 06, 2006 at 23:31 UTC | |
|
Re: cleaner code ....
by jdporter (Paladin) on Dec 06, 2006 at 23:51 UTC | |
|
Re: cleaner code ....
by Fletch (Bishop) on Dec 07, 2006 at 00:00 UTC | |
|
Re: cleaner code ....
by throop (Chaplain) on Dec 07, 2006 at 04:35 UTC | |
|
Re: cleaner code ....
by jwkrahn (Abbot) on Dec 07, 2006 at 11:01 UTC | |
|
Re: cleaner code ....
by GammaRay Rob (Friar) on Dec 07, 2006 at 15:53 UTC | |
by swampyankee (Parson) on Dec 07, 2006 at 16:09 UTC | |
|
Re: cleaner code ....
by tdevil76 (Beadle) on Dec 07, 2006 at 22:40 UTC |