Thread Dateizeile auswerten (2 answers)
Opened by Manos at 2010-11-27 22:59

pq
 2010-11-27 23:43
#143142 #143142
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
if ($line =~ m/^(\w+) (\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)$/) {
    my ($word, $n1, $n2) = ($1, $2, $3);
}


ein bisschen lektüre zu regexes:
http://p3rl.org/perlre
http://p3rl.org/perlretut
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 Dateizeile auswerten