in reply to Woes with binmode

Yeah, you need to use 'binmode':
if ( open (FILE, ">", "$filename") ) { binmode FILE; print FILE $webpage; close FILE; }
OOPS: Sorry, I now see that you _are_ using binmode.
--
Wade