in reply to Searching string for paragraph..

Have you tried the multiple-line modifier (m at the end of the regex)? See the entry in the PerlFAQ (part 6).

if(Dumper($page) =~ m/Daniel(.*?)world/m) { print $1; }

Update: moritz is right ... use s instead of m!
Rata (who promises to be more concentrated next time)

Replies are listed 'Best First'.
Re^2: Searching string for paragraph..
by moritz (Cardinal) on May 06, 2010 at 13:08 UTC
    Although I don't understand the original question (mabye due to bad formatting?) I can tell that the /m modifier on your regex doesn't do anything - it merely affects ^ and $ to match line start/ending (instead of string start/ending).

    You probably meant the /s modifier instead, which makes . also match a newline.

    A reply falls below the community's threshold of quality. You may see it by logging in.