in reply to Combining while statements
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.
|
|---|