in reply to Returning Line where Characters Have been found
use warnings; use strict; my $search; my $cmdout = "some words\nHello i like Perlmonks.org \n more words"; if ($cmdout =~ / \n ( .* Perlmonks\.org .*) \n /sx) { $search = $1; print "$search\n"; } __END__ Hello i like Perlmonks.org
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |