Thread Textdatei auslesen, nur bestimmten Abschnitt (4 answers)
Opened by PETER_PAN2009 at 2010-03-29 16:33

pq
 2010-03-29 16:39
#135464 #135464
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
while (my $line = <$fh>) {
    if ($line =~ m/^Part1:/ .. $line =~ m/^Part2:/) {
        push @array, $line;
    }
}


http://p3rl.org/perlop stichwort flip-flop-operator
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 Textdatei auslesen, nur bestimmten Abschnitt