in reply to help with a function that will cut out redundancy across two lists

Hi Anna,

Any time you need to remove duplicates in Perl think of using a hash and iterating over the two files incrementing a value indexed by the elements you're cleaning.

If subsequently you need to find out how many instances of each element there was the associated value will tell you.

Give this a go and if you have any problems get back to us.

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
  • Comment on Re: help with a function that will cut out redundancy across two lists
  • Download Code