in reply to Generic multiline grepping

my @file=<FILE>;

You have errors in your code preventing success:

First, quote your strings:

my $logpattern1='rrcConnection'; my $logpattern2='measurementReport'; my $logpattern3='Event';

Second, remember the name of your open filehandle:

open(LOGFILE,"$filepath"); my @file=<LOGFILE>;

#.........^^^

Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)