Gibt es irgendwie einen Anfangstag oder hast Du wirklich nur den String wie oben??
Dann könnte es so aussehen:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /usr/bin/perl
use strict;
use warnings;
use HTML::Parser;
my $text = '';
my $string = "LDGPTLIVIQRTCXITQGLAFATAXYXNHYQSWZMNTNLLLIIYZQFWFLIEMZLVNHQM<span class='stil3'>B<\/span>IKECTWXFYKQTVHGMRM<span class='stil3'>B<\/span>YEHGAYTCXALGE<span class='stil3'>B<\/span>HRLGEKTFXQFAMCGLCTXCTCSLFLNINNDZTDCZRWLAKEDRHGPKYMNFQECCHRGFNPZ<span class='stil3'>B<\/span><span class='stil3'>B<\/span>WNRXQHYIGXWRRH<span class='stil3'>B<\/span>SFIGDYLNLW<span class='stil3'>B<\/span><span class='stil3'>B<\/span>LQLHLIKVWAVMDCZETV<span class='stil3'>B<\/span>XDDDKCLPKWKATTQZV<span class='stil3'>B<\/span>MLHAADMYF<span class='stil3'>B<\/span>ADA<span class='stil3'>B<\/span>LXSQIPP<span class='stil3'>B<\/span>ITZKTFGQNZIPRCLENXKAZZLFKKRWICCZDFMQDED<span class='stil3'>B<\/span>SCHXYLWKLCTVHRZAF<span class='stil3'>B<\/span>AZDPLFNIEEKGLTII<span class='stil3'>B<\/span>QPPQAYNRPY<span class='stil3'>B<\/span>HTSFCH<span class='stil3'>B<\/span>IXHFZQYPMHQSLPDRQXWVASR<span class='stil3'>B<\/span>KXELCMIZEKKDZMSHIPLY<span class='stil3'>B<\/span><span class='stil3'>B<\/span>AXYQGWIXNPKZXDWCTEEXFAAZMSSYNGVAZGLLNZEKVYDNANK<span class='stil3'>B<\/span>EQXXGVTHPKWRWYDGWPHXI<span class='stil3'>B<\/span>DSEA<span class='stil3'>B<\/span>MKLVWRTHVRHTEGQKCCFLXRYHFEZSQSFAHNRVCHMVTDPKN<span class='stil3'>B<\/span>CPENL<span class='stil3'>B<\/span>FQCKNDTGDKQKMMAFWHICTENCNQATQEADYZHDPZGDQNSW<span class='stil3'>B<\/span>DHSKCHKMXDCRWEXARFWYGKIACRMSMNL<span class='stil3'>B<\/span>YMVHGAGKYMPQQZHRFPDKERHFPXNHVQTCYMZKNMSXSPPNDDSSVLZWLZVKE<span class='stil3'>B<\/span>ENFERTYGPWSKDYHMCRQDDZAHDAARVLEGLYRTNGIWZZYVHKMLZRQVGECSLZ<span class='stil3'>B<\/span>RXETQCD<span class='stil3'>B<\/span>P<span class='stil3'>B<\/span>SFDGNHMMYNM<span class='stil3'>B<\/span>IRQYTYDMAVMZ<span class='stil3'>B<\/span>LIZGQIIXIGPLEPFYLXAYNPMXCEVVRAHKTQQQSGALCIYZDXPPAVLVDDRRWMWEGWSHPSQSVDZVMLFSTRZXLM
WTPHRWZQZIHYFQQVMLNGQDFSFIXREPWFRVATAZCFMTRYLZEFNATLQIRHTCLHNDVIEDYLSLHCNCLXGWFH<span class='stil3'>B<\/span>TK<span class='stil3'>B<\/span>FHWMHGRLRZPESKVC<span class='stil3'>B<\/span>KNWFLWLCILKFLPZZKLLMNSLNCFDGLHWXSGGM<span class='stil3'>B<\/span>DTQNCYD<span class='stil3'>B<\/span>QQX<span class='stil3'>B<\/span>TMTWDFSMHNYKIIIDPEFNZP<span class='stil3'>B<\/span>DCGTX";
my $p = HTML::Parser->new();
$p->handler(text => \&start_handler,"dtext");
$p->parse($string);
$text =~ s~[^A-Z]~~gs;
$text =~ s~([A-Z]{70})~$1<br />~sg;
$text =~ s~B~<span class='stil3'>B</span>~g;
print $text;
sub start_handler{
$text .= shift;
}
(ungetestet)