sqspat has asked for the wisdom of the Perl Monks concerning the following question:
#compare the commands in the arrays if (($commands_run[0] =~ /$commands[0]/) &&($commands_run[1] =~ /$commands[1]/) &&($commands_run[2] =~ /$commands[2]/) &&($commands_run[3] =~ /$commands[3]/) &&($commands_run[4] =~ /$commands[4]/)) { print "Test -----PASS\n"; } else { print "Test ---- FAIL\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: if statement comparing elements of arrays?
by Corion (Patriarch) on Jul 14, 2009 at 09:29 UTC | |
|
Re: if statement comparing elements of arrays?
by JavaFan (Canon) on Jul 14, 2009 at 09:46 UTC | |
|
Re: if statement comparing elements of arrays?
by ikegami (Patriarch) on Jul 14, 2009 at 15:00 UTC | |
|
Re: if statement comparing elements of arrays?
by si_lence (Deacon) on Jul 14, 2009 at 09:32 UTC | |
|
Re: if statement comparing elements of arrays?
by jeanluca (Deacon) on Jul 14, 2009 at 11:16 UTC |