in reply to Search for string between specific character numbers in a line
If you are slurping the entire file, use substr:
if( substr( $file, 294, 6 ) =~ /.../ ) { print 'found'; } else { print 'not found'; } [download]