sub MakePtag { join "\r\n", map {"

$_

"} grep {/\S/} split "\r\n", $_[0] } # :)