I'd go for something like:
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. :)my @s = (); local $" = '.'; @out = map { $#s=--$_; ++$s[$_]; "@s" } @a;
Hugo
In reply to Re: Problem in generating ids through Array
by hv
in thread Problem in generating ids through Array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |