use strict; use warnings; undef $/; chomp(my $whole_file = ); print "***\n$whole_file\n***\n"; $whole_file =~ s/.*?Title:.*?<\/b>\s?(.*?)
/$1<\/WANTED>\n/gs ; print "$whole_file"; __DATA__ a whole lot of worthless stuff Title: STRING_I_WANT
more worthless meaningless stuff or sometimes Title: ANOTHER STRING_I_WANT