It should be just a case of discarding all lines which are the same, and importing the others into the first while statement:
open(TMPFILE,"<page.html") || die "Cant open: $!";
while (<TMPFILE>)
{
chomp;
my $myFile2 = join('',<TMPFILE>);
if ($myFile2 =~ /(\d{3})wordTWO/) { $data2 = $1; }
C.
In reply to Re: Combining while statements
by castaway
in thread Combining while statements
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |