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
In reply to Re: Returning Line where Characters Have been found
by toolic
in thread Returning Line where Characters Have been found
by apraxas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |