use HTML::Parser; use LWP::Simple; my $html = get "http://192.168.0.3/testing.htm"; HTML::Parser->new(text_h => [\my @accum, "text"])->parse($html); $file = "test.txt"; open(FILE,">>$file") or warn "File $file not found!\n"; print FILE map $_->[0], @accum;