Basically after getting the input which starts with 2, i want to handle the remaining lines in a different manner, so going to a different loop. But this break, is not breaking the first while loop ? I understand, it is my misunderstanding, but what is it, and how to solve it ?while (<STDIN>) { print "--> $_"; if ( /^2/ ) { break; } print "--> $_"; } while (<STDIN>) { print "==> $_"; }
In reply to whats wrong with this break ? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |