in reply to finding the distinct elements in an array
my @a = ( 1..3, 2..3, 6, 8..9); my $last_element = ""; my @sorted_aray = sort(@a); foreach $i (@aorted_array){ if ($last_element ne $i){ print $i; $last_element = $i; } } [download]
Enjoy! Dageek