in reply to Re: Grabbing Structured multi line output from a file?
in thread Grabbing Structured multi line output from a file?

$/ = 'next'; # read by chunks /edit "(\S+)".*set ip (\S+)/s and $ips{$1} = $2 while <DATA>;

Eeew ... next can occur anywhere in the data

edit "nextag" set vdom "second after next" set alias "third after next"

Replies are listed 'Best First'.
Re^3: Grabbing Structured multi line output from a file?
by Anonymous Monk on Apr 04, 2015 at 16:50 UTC

    So tweak it if necessary :)

    $/ = " next\n"; # read by chunks