Perl: HOA and redundancy
Hi all,
I have a Hash of Arrays and in the array there is a lot of redundancy. I want to take all of this out. How can I do that. I know I could access the array and then RE the 1st part of the array and then do if's to see if it is there or not but won't this take, like ages? Maybe someone knows of a good CPAN script to help me. I looked couldn't see anything. :study: Cheers, |
Given that perl is compiled before it's run, unless you have enormous amts of data, it shouldn't take that long.
We really need to see a minimal version of the code to make a judgement though. |
Sorry, here is the script.
Code:
while (my $line=<Prot>){ Yea, tried it and is goes pretty quickly, it's an XML file. The making of the HOA was a lot better than I thought it would be. :rolleyes: |
I don't get where the real prob is...
Is there still one? test data would be nice. |
So I got a hold of both the perldoc's
perldoc -q redundancy and List::MoreUtils at the moment I'm using uniq() which is a function that the library supplies. |
All times are GMT -5. The time now is 10:51 PM. |