Просто добавьте \n
символов, что означает «Конец строки»:
my $name = "Fred Flinstone";
my $address = "Cave Stone Road 345";
my $city = "Cobblestone";
my $state = "Rock";
my $zip = "13131";
print ("<span class='titel'>\n");
$~ = "MULTILINE";
write;
format MULTILINE =
===============================
| @<<<<<<<<<<<<<<<<<<<<<<<<<< |
$name
| @<<<<<<<<<<<<<<<<<<<<<<<<<< |
$address
| @<<<<<<<<<<<<<<<<, @< @<<<< |
$city, $state, $zip
===============================
@*
.
print ("</span>\n");
print ("<br><br>\n");
Вернется:
<span class='titel'>
===============================
| Fred Flinstone |
| Cave Stone Road 345 |
| Cobblestone , Ro 13131 |
===============================
</span>
<br><br>