Thread Dateizeile auswerten
(2 answers)
Opened by Manos at 2010-11-27 22:59 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: Wie frage ich & perlintro brian's Leitfaden für jedes Perl-Problem |