|
Re: Removing Dup Files: msg#00073lang.perl.macosx
I've succeeded somewhat in doing it with the code below, but this cannot be efficient and I know there must be a better approach. Well, I'd get rid of all those if with a foreach and a counter. Pseudo-code below. my @fields = ( 'c_state', 'c_city' ); my $field_count = scalar(@fields); my $matched_data = 0; foreach (@fields) { if ($SAVE->{$_} eq $COMPARE->{$_}) { $matched_data++; } } if ($field_count == $matched_data) { delete; } -- Morbus Iff ( you are nothing without your robot car, NOTHING! ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Removing Dup Files: 00073, Bill Stephenson |
|---|---|
| Next by Date: | Re: Removing Dup Files: 00073, Morbus Iff |
| Previous by Thread: | Removing Dup Filesi: 00073, Bill Stephenson |
| Next by Thread: | Re: Removing Dup Files: 00073, Morbus Iff |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |