in reply to Problem in generating ids through Array
@a=(1, 2, 3, 3, 2, 1, 2, 2); my @c = (); my $last = 0; for my $i(@a) { $c[$i+1] = 0 if $i < $last; $c[$i]++; $last = $i; push @out, join '.', grep{$_} @c; } print "$_\n" for @out; [download]
cheers
tachyon