Thread vorsilbe an elemente eines arrays haengen (26 answers)
Opened by element at 2009-09-22 18:40

pq
 2009-09-22 18:56
#126026 #126026
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
oh ja, das geht viel schöner =)
Code (perl): (dl )
1
2
3
4
5
6
$_ = "$pwd/$_" for @paths;

# oder etwas gesprächiger:
for my $path (@paths) {
    $path = "$pwd/$path";
}
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 vorsilbe an elemente eines arrays haengen