How do I get the total items in an array, NOT the last id?
None of two ways I found to do this works:
my @a; # Add some elements (no consecutive ids) $a[
sub uniq { return keys %{{ map { $_ => 1 } @_ }}; } my @my_array = ("a","a","b","b","c"); #print join(" ", @my_array), "\n"; my $a = join(" ", uniq(@my_array)); my @b = split(/ /,$a); my $count = $#b;