This will do it:
use Data::Dumper; + open(IN, "< myfile.txt") or die $! my $data_ok = 0; + while(<IN>) { chomp; + m/^\s*>\s*$/ and last; # stop when encountering that last ">". $data_ok and push @data, $_; # keep all data inbetween. m/Testnok/ and $data_ok = 1; # start after "Testnok". } print Dumper \@data;
Cheers, Sören
In reply to Re: reading from a textfile
by Happy-the-monk
in thread reading from a textfile
by bory
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |