Indeed it can, thanks to the utility of do.
$text = '<p class="first">' . do { $text =~ s|(\n\n+)|</p>\1<p class="later">|g; $text } . '</p>';
In reply to Re: Concatenation and Regex on one Statement?
by dws
in thread Concatenation and Regex on one Statement?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |