[Omaha.pm] $ids[$i++]

Andy Lester andy at petdance.com
Fri Oct 19 12:07:42 PDT 2007


> But now my C++ mid-term I just took last night has me thinking like this:
> 
> my $i = 0;
> foreach my $single_reason (split /\|/, $reason) {
>    my $id = $ids[$i++];

Why do you want to know where in the array you are?  Should you be
avoiding the loop index entirely?

-- 
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance


More information about the Omaha-pm mailing list