All the files have been sorted, therefore, looping through file.1 file.2 etc. However, if the 'if' statement is run i need to exit the for loop and go to the next while loop entry. e.g. if the 'if' loop is executed on file.2 go to next while step and try again with file.1 I am not sure how to exit the for loop? Thankswhile (<FH>) { ($col1, $col2) = split m/\s+/; for $file (keys %files) { if (exists $files{$file}{$col2} ) { .....do something.... } } }
In reply to exit a loop by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |