volcan has asked for the wisdom of the Perl Monks concerning the following question:
Wanda Smith (332)432-9887<br> Freddie Sonere 442-9089<br> Bob Wilson 332-454-9932<br><br>
Bob Cartwright (821)987-0089<br> Felix Harris 433.344.8711<br> Bob Wilson (888)821- 2248<br><br>
and here's my code so far for making the master list:Sam Burr 455-0327<br> Gloria Simpson (821)544-9341<br> Wanda Smith 444-9721<br><br>
Thank you very much to anyone who can help me. :)#combine client lists into one list #strip all extraneous symbols #! usr/bin/perl -w while (<>) { chomp($inp = $_); $client = $inp; $client =~ tr/0-9().-//d; $num = $inp; $num =~ tr/a-zA-Z().-//d; $num =~ tr/ //d; #make big list<br> $bigList{$client}{$num}++; } for $one (sort keys %bigList) { + print "$one ", join ', ', sort {$a <=> $b} keys %{$bigList {$one}}; + print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Combining client phone lists
by GrandFather (Saint) on Apr 20, 2007 at 04:46 UTC | |
by volcan (Novice) on Apr 20, 2007 at 05:09 UTC | |
by GrandFather (Saint) on Apr 20, 2007 at 05:29 UTC | |
by volcan (Novice) on Apr 20, 2007 at 05:38 UTC | |
by GrandFather (Saint) on Apr 20, 2007 at 05:43 UTC | |
| |
by naikonta (Curate) on Apr 20, 2007 at 05:44 UTC | |
|
Re: Combining client phone lists
by Corion (Patriarch) on Apr 20, 2007 at 07:04 UTC | |
|
Re: Combining client phone lists
by Krambambuli (Curate) on Apr 20, 2007 at 08:53 UTC |