How about a regex with the /m modifier like this:
$/ = "\n\n"; # set to grab whole paragraphs, not lines my @paras = <DATA>; my $whatever = qr/paragraph/; for (@paras) { print "$1$2$3\n" if /^(.*)($whatever)(.*)$/m; } __DATA__ This is the first paragraph And paragraph two is here Here is the third paragraph to wrap it up
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Isn't there a print line function?
by tachyon
in thread Isn't there a print line function?
by brassmon_k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |