@array = ( "file1:aa" , "file2:bb" , "file3:cc" ); if ( grep ( /aa/i,@array) ) { print "Matched\n" }