hi,
As we read in Damian Conway- Perl6-notes, there will by a var-iterator that
can be used to see how many times the cycle has been "traversed" i.e.
foreach my $el (@ary) {
.. do something ....
print $#; <--- print the index (or print $i )
}
shall we have :
foreach my $el (@ary) {
print $# if $#.first(); <--- print the index on the first iteration
i.e. 1
.. do something ....
print $# if $#.last(); <--- print the index on the first iteration
i.e. $#ary
};
note : we can iterate on something else not only array
OR :
foreach my $el (@ary) {
print $# if first;
.. do something ....
print $# if latest;
};
=====
iVAN
[EMAIL PROTECTED]
=====
PS. One place where TT is before Perl :")