in reply to multi line matching problem

Perhaps you are looking for something like this instead?
use strict; use warnings; my $data = do {local $/; <DATA>}; $data =~ y/ \n/ /s; # add the following if you want to strip space after > # and before < characters. # $data =~ s/(?<=>)\s|\s(?=<)//gm; print "$data\n"; __DATA__ <thing> condition condition randomness other junk more junk </thing>
and the output -
<thing> condition condition randomness other junk more junk </thing>

Replies are listed 'Best First'.
Re: Re: multi line matching problem
by jcpunk (Friar) on Dec 16, 2003 at 02:45 UTC
    wow, thats perfect and answered in record time.
    thanks