parse_file doesn't do what you think, but, as usual, what it says ;--) It parses a file, not a string. So this time it tries to parse a file with avery, very long name, full of pointy brackets, with the same result as your previous attempt. Replace parse_file by parse and you'll be all set.
A couple more things:
- what you should have printed, in order to check that the tree was properly created, is not $html, but $tree->as_HTML,
- always, ALWAYS, use strict, and most of the time use warnings, that will save you a lot aggravation
when you develop