If you don't want to print PASS/FAIL on every iteration, you will need to remember the current overall status of PASS or FAIL, and only print it at the end. You could for example count the PASSes and FAILs, and if there are more than zero FAILs, output an overall FAIL. Also consider Test::Simple, to have ok(), fail() and a framework that checks the output of such scripts.
In reply to Re: if else statement check an array
by Corion
in thread if else statement check an array
by sqspat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |