while (<>) { /^hostname/ and do { $host_section = 1; ++$tot; # number of hostnames }; if ($host_section) { print $_; ++$tot2; # lines in host sections # do some processing... } /^end-of-hostname-pattern/ and do { $host_section = 0; }; }
In reply to Re: Too much recursion
by pklausner
in thread Too much recursion
by jrvd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |