Q
quakewang
hi,
I get a image data from the internet and then save it into a
newcreated file, but seems the saved data is not the same as the
original one.
$file_name++;
my $success = open FILE_HD, "> $file_name";
if ( ! $success) {
# The open failed
warn $file_name . "open failed! [$!]\n";
}
print FILE_HD $response->content;
close FILE_HD;
why?
I shall use which function to write the binary data?
thanks.
I get a image data from the internet and then save it into a
newcreated file, but seems the saved data is not the same as the
original one.
$file_name++;
my $success = open FILE_HD, "> $file_name";
if ( ! $success) {
# The open failed
warn $file_name . "open failed! [$!]\n";
}
print FILE_HD $response->content;
close FILE_HD;
why?
I shall use which function to write the binary data?
thanks.