As I said, your open and print works fine, you just copied an example someone gave you, which prints a string to a file. You need to print the content of your variable to the file, rather than a fixed string. Did you look at the documentation I linked to? This is what I mean about copying and pasting code without trying to understand what it does.
In reply to Re^5: Redirect HTML::TreeBuilder to file
by marto
in thread Redirect HTML::TreeBuilder to file
by TonyNY
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |