# while ( $file =~ /start_pattern(.*?)$end_pattern/gs ) { print "$1\n"; } #