Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
open(TMPFILE,"<page.html") || die "Cant open: $!"; while (<TMPFILE>) { chomp; my $myFile = join('',<TMPFILE>); if ($myFile =~ /'(\d{3})wordONE/) { $data = $1; } } close TMPFILE; open(TMPFILE,"<page.html") || die "Cant open: $!"; while (<TMPFILE>) { chomp; my $myFile2 = join('',<TMPFILE>); if ($myFile2 =~ /(\d{3})wordTWO/) { $data2 = $1; } } close TMPFILE; #Do stuff with $data and #data2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Combining while statements
by broquaint (Abbot) on Jun 17, 2003 at 13:21 UTC | |
|
(jeffa) Re: Combining while statements
by jeffa (Bishop) on Jun 17, 2003 at 13:24 UTC | |
|
Re: Combining while statements
by Zaxo (Archbishop) on Jun 17, 2003 at 13:31 UTC | |
by Anonymous Monk on Jun 17, 2003 at 15:09 UTC | |
|
Re: Combining while statements
by Bilbo (Pilgrim) on Jun 17, 2003 at 13:18 UTC | |
|
Re: Combining while statements
by castaway (Parson) on Jun 17, 2003 at 13:20 UTC | |
|
Re: Combining while statements
by tcf22 (Priest) on Jun 17, 2003 at 13:21 UTC | |
|
Assigning Flat Files to Arrays
by Dente (Acolyte) on Apr 27, 2004 at 00:47 UTC | |
by jeffa (Bishop) on Apr 27, 2004 at 05:45 UTC |