Re: array uniq elements

2012-01-09 Thread Chris Stinemetz
Thank you Jim. Your advice worked perfectly. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: array uniq elements

2012-01-08 Thread Jim Gibson
At 11:15 PM -0600 1/8/12, Chris Stinemetz wrote: How do I extract uniq elements from an array? Basically I want to preserve the order of the elements as they are first seen, but I would like to remove any duplicates. Use a hash to keep track of elements. Create an entry in the hash with the el

Re: array uniq elements

2012-01-08 Thread Robert Wohlfarth
On Sun, Jan 8, 2012 at 11:15 PM, Chris Stinemetz wrote: > How do I extract uniq elements from an array? Basically I want to > preserve the order of the elements as they are first seen, but I would > like to remove any duplicates. > You may want to check out List::MoreUtils on CPAN. -- Robert Wo

array uniq elements

2012-01-08 Thread Chris Stinemetz
How do I extract uniq elements from an array? Basically I want to preserve the order of the elements as they are first seen, but I would like to remove any duplicates. Below is what I have so far. Thank you in advance. Chris #!/usr/bin/perl use warnings; use strict; use Data::Dumper; my @head