in reply to matching some lines
$whole_file = join ('', <DATA>); @parts = split /\(.*?\)/, $whole_file; foreach (@parts) { print if $_; } __DATA__ (CSW - Q1) OMIPMS55:NTTCSWQ1:MQSI.3PL846 OMIPMS55:NTTCSWQ1:MQSI.STATUS OMIPMS55:NTTCSWQ1:MQSI.3PLXDOCK.STATE (CSW - Q2) OMIPMS55:NTTCSWQ2:MQSI.3PL846 OMIPMS55:NTTCSWQ2:MQSI.3PL944 (CSW - Q3) OMIPMS55:NTTCSWQ3:MQSI.3PL846
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|