Thread string nach jeder 4000 Stelle ein TAB einsetzten (29 answers)
Opened by mr-sansibar at 2007-08-02 13:42

bloonix
 2007-08-02 14:19
#97281 #97281
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
my $len = length($tmp_line);
my $pos = 0;
my $tab = 5;
while ( my $s = unpack("x$pos A4000", $tmp_line) ) { 
    $tab--;
    print $frontend "$s\t";
    $pos += 4000;
    last if $pos >= $len;
}   
print $frontend "\t" x $tab;
print $frontend "\n";
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread string nach jeder 4000 Stelle ein TAB einsetzten