in reply to Read text from HTML file and display it

OR, if you have lynx on your system,
you can do like so:

use warnings; use strict; my $filename = $ARGV[0]; my $ascii = system("lynx -dump $filename"); print $ascii;

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Replies are listed 'Best First'.
Re^2: Read text from HTML file and display it
by Lotus1 (Vicar) on Oct 29, 2012 at 20:35 UTC
    use warnings; use strict; my $filename = $ARGV[0]; my $ascii = system("lynx -dump $filename"); print $ascii;

    Your $ascii variable will contain the return value, a number, from system which is not what you seem to be expecting. Backticks or qx() will return what normally goes to STDOUT.