if( substr( $file, 294, 6 ) =~ /.../ ) { print 'found'; } else { print 'not found'; }