in reply to Re: match multi-lines from config file
in thread match multi-lines from config file

/^description/ && last while <IN>;
that confused the heck out of me! how about this form?
$_ = <IN> until /^description/;
doh!

Replies are listed 'Best First'.
Re^3: match multi-lines from config file
by GrandFather (Saint) on Aug 07, 2007 at 10:41 UTC

    Because that tests $_ before the first value is assigned to it and doesn't terminate for a file that doesn't include a matching line!


    DWIM is Perl's answer to Gödel