dsula has asked for the wisdom of the Perl Monks concerning the following question:
1 for (my $i = 0; $i < @libs; $i++) { 2 my $file = $libs[$i]{'file'}; 3 print "reading $file\n"; 4 } 1 foreach my $lib (@libs) { 2 my $file = $lib{'file'}; 3 print "reading $file\n"; 4 }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: foreach problem
by Fletch (Bishop) on Mar 03, 2009 at 19:21 UTC | |
|
Re: foreach problem
by kennethk (Abbot) on Mar 03, 2009 at 19:23 UTC | |
|
Re: foreach problem
by ikegami (Patriarch) on Mar 03, 2009 at 20:06 UTC | |
|
Re: foreach problem
by zwon (Abbot) on Mar 03, 2009 at 19:23 UTC | |
|
Re: foreach problem
by glasswalk3r (Friar) on Mar 03, 2009 at 19:25 UTC | |
by GrandFather (Saint) on Mar 03, 2009 at 19:56 UTC |