in reply to Returning Line where Characters Have been found
use strict; use warnings; my $cmdout = join '', <DATA>; while ($cmdout =~ /^(.*?lines.*?)$/mg) { print "$1\n"; } my @cmdout = split /\n/, $cmdout; for (@cmdout) { print "$_\n" if m/lines/; } __DATA__ my multiple lines of data go here and here are some more lines of data
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Returning Line where Characters Have been found
by apraxas (Initiate) on Dec 13, 2011 at 15:00 UTC | |
by cavac (Prior) on Dec 13, 2011 at 15:42 UTC | |
by TJPride (Pilgrim) on Dec 13, 2011 at 19:29 UTC |