The stupid question is the question not asked | |
PerlMonks |
Re: Parsing output from a commandby BrowserUk (Patriarch) |
on Mar 24, 2009 at 15:57 UTC ( [id://752907]=note: print w/replies, xml ) | Need Help?? |
By setting $/ to '', it enables 'paragraph mode' whereby each read will terminate when two (or more) consecutive newlines are encountered. That allows you to read each multiline record in your output in two chunks. The header line and then the rest:
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|