in reply to Problem in generating ids through Array

I'd go for something like:

my @s = (); local $" = '.'; @out = map { $#s=--$_; ++$s[$_]; "@s" } @a;
except that I'd do it in a way that didn't modify the source array. Of course, if this were homework it would probably be better to write it in a way that showed I understood what I was doing. :)

Hugo