in reply to help printing items across multiple lines
Sometimes a useful trick is to change the input line separator ($/ - perlvar). Consider:
use strict; use warnings; local $/ = 'Pseudo name='; /^(\w*).*?Logical device ID=(\w*)/s and print "$1, $2\n" while <DATA>; __DATA__ Pseudo name=hdiskpower97 Symmetrix ID=000187751303 ...
given all the samples data prints:
hdiskpower97, 0380 hdiskpower90, 0381
|
|---|