Try like this,
use strict; use warnings; my $str = <<EOF; abc: asdf1 asdf2 def: asdf3 ghi: asdf4 asdf5 EOF my @str = split/(?=\n+\w)/, $str; print "$_" for @str; #or $str =~ s/(^|\n+)(\w)/$1<\/p>\n<p>$2/gsi; $str =~ s/^(<\/p>)\n*(.+)$/$2$1/gsi; print $str;
Regards,
Velusamy R.
In reply to Re^3: How to split into paragraphs?
by Samy_rio
in thread How to split into paragraphs?
by jrw
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |