Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: read multiple lines

by Punitha (Priest)
on Nov 13, 2008 at 09:51 UTC ( #723392=note: print w/replies, xml ) Need Help??

in reply to read multiple lines


If you want the content in between 'begin' and 'end process' means try like this,

use strict; my $string ='hfkjd process jhk start begin output1 output2 end process scrap hkl process khfk shoot hooter begin output3 end process'; while($string=~/\bbegin((?:(?!end process).)*)end process/sg){ print "IN:$1\n"; }

or tell us clearly what you really need and what you tried so far?