Rather than just copy/paste stuff without understanding take a look at open and print. You've copied an example you were given which writes the string "This will be printed to the file", to the file... you know the line you commented out prints what you want to the screen.
In reply to Re^3: Redirect HTML::TreeBuilder to file
by marto
in thread Redirect HTML::TreeBuilder to file
by TonyNY
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |