use strict; my $ex = 0; while (<DATA>) { if ( /^java/ && /Exception$/ ) { print "\n" if $ex; $ex++; } print; } __DATA__ java.io.IOException at com.mycompany.MyClass.myMethod(com.mycompany.MyClass.java:3 +2) at com.mycompany.MyClass.main(com.mycompany.MyClass.java:18) java.lang.IllegalStateException at com.mycompany.MyClass.myMethod(com.mycompany.MyClass.java:25 +) at com.mycompany.MyClass.main(com.mycompany.MyClass.java:18)
In reply to Re: Adding a blank line after last line of match
by holli
in thread Adding a blank line after last line of match
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |