in reply to capture multiple lines
#!/usr/bin/perl use strict; my @array; while( <DATA> ) { push( @array, $1 ) if ( /^(Include:\s.*)/ ); } print @array; __DATA__ Client/HW/OS/Pri: natsciexevs19 PC WindowsNET 0 0 0 0 ? Include: Microsoft Information Store:\SG1 Include: NEW_STREAM Include: Microsoft Information Store:\SG2 Include: NEW_STREAM Include: Microsoft Information Store:\SG3 Exclude: (none defined)
|
|---|