use strict; use warnings; local $/ = "
"; while ( ) { print $1 if /Title:(.*?)
/s; } __DATA__ a whole lot of worthless stuff Title: STRING_I_WANT
more worthless meaningless stuff or sometimes Title: ANOTHER STRING_I_WANT
#### use strict; use warnings; local $/ = "
"; while ( my $line =~ ) { if ( $line =~ /Title:.*?<\/b>\n?(.*?)
/s ){ my $saved_var = $1; print "$saved_var\n" } } __DATA__ a whole lot of worthless stuff Title: STRING_I_WANT
more worthless meaningless stuff or sometimes Title: ANOTHER STRING_I_WANT