my $ls = 0; while (<SCORES>) { if (/^LINESCORE/) { $ls++; } #linescore is greater than 1(we found LINESCORE) and less than 3(we +haven't read 2 lines yet) elsif ($ls && $ls < 3) { chomp; push @line, $_; $ls++ } }
Hope this helps..
Rich
In reply to Re: Re: Re: Re: Using a Sub to pull info. from a Text File
by rchiav
in thread Using a Sub to pull info. from a Text File
by Perl Newby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |