Hi This solution makes it run slower, isn't it ? Since Perl has to use access-by-index, isn't it ?
Yossi ________________________________________ From: [email protected] [[email protected]] On Behalf Of sawyer x [[email protected]] Sent: Friday, February 24, 2012 10:01 AM To: Perl in Israel Subject: Re: [Israel.pm] C style for loop On Fri, Feb 24, 2012 at 9:41 AM, Stefan Hornburg (Racke) <[email protected]<mailto:[email protected]>> wrote: How do you write for loops without C-style where you need a running index inside the loop code? Simple: foreach my $idx ( 0 .. $#array ) { print $array[$idx], "\n"; } This e-mail message is intended for the recipient only and contains information which is CONFIDENTIAL and which may be proprietary to ECI Telecom. If you have received this transmission in error, please inform us by e-mail, phone or fax, and then delete the original and all copies thereof. _______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
