open TMPFILE,'page.html' or die "Can't open: $!"; my $data = do {local $/;}; my @data = $data =~ /(\d{3})word/g; print "$_\n" for @data;