aye, adding binmode(FILE); binmode(STDOUT); after the open should fix it.
Update: Typo fixed.
In reply to Re^2: Need help with downloading by ikegami in thread Need help with downloading by gl2103