in reply to opening html files
"http://www.perl.com/pub/a/2000/12/begperl4.html" is not a file. It's a URL. If you are wanting to open a file on your local machine, use the path to the file in $html. Otherwise, if you want to parse the contents of a web site on a remote server, you need to fetch the web page first. LWP::Simple is probably what you want. Alternatively, use wget to fetch the remote site and copy it to a local file, then open the local copy using the method you have outlined above.