Thread Split mit verschiedenen Trennern
(4 answers)
Opened by rk-ger at 2009-11-18 19:43
versuchs mal so:
Code (perl): (dl
)
1 2 3 if ($line =~ m/^(\d+) (\d{2}\.\d{2}\.\d{4}) (.*?) (\d{2}\.\d{2}\.\d{4}) (-?[.\d]+,?\d*)$/) { print "($1 | $2 | $3 | $4 | $5)\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: Wie frage ich & perlintro brian's Leitfaden für jedes Perl-Problem |