if ($element =~ m/\//; $element =~ s/\<\/td>$//; $element =~ s/[,]//g; next if ($element !~ m/^\d{1,3}\d{3}\d{3}/); push @stats, $element; } elsif ($element =~ m/\

/){ chomp $element; $element =~ s/^

//; $element =~ s/<\/h1>$//; push @id, $element; } } push @{$hash{$id}}, @stats;