Thread spliten (8 answers)
Opened by Martin at 2010-03-08 14:37

pq
 2010-03-08 16:08
#134283 #134283
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
my @s = qw/ hallohallohallO hannahannahannA /;
for (@s) {
    $_ = [m/(.{1,5})/g];
}
for my $i (0 .. $#{ $s[0] }) {
    for (@s) {
        print "$_->[$i]\n";
    }
}
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread spliten