in reply to Exporting Curl content to html

my $contents = $1;
does $contents have anything? anyway, try to put
use open IO => ":raw";
on top of that thing.