bryan172 has asked for the wisdom of the Perl Monks concerning the following question:
I would be very grateful if someone would point out the obvious thing I'm not seeing. Thanks! Bryan#!c:\strawberry\perl\bin\perl.exe -w displayBoard( ); @test = ( [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], ); sub displayBoard { foreach ( @test ) { print "@$_\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I can't figure out what's wrong with this foreach loop
by toolic (Bishop) on Mar 13, 2011 at 18:45 UTC | |
|
Re: I can't figure out what's wrong with this foreach loop
by wind (Priest) on Mar 13, 2011 at 20:24 UTC | |
|
pragmas are good
by am0c (Initiate) on Mar 13, 2011 at 19:11 UTC | |
by ikegami (Patriarch) on Mar 13, 2011 at 19:18 UTC | |
by bryan172 (Novice) on Mar 13, 2011 at 19:50 UTC |