You will probably be on Win32 and will not have applied binmode to the filehandle you used to save the data.
open F, $outfile or die $!;
binmode F;
print F $response->content;
close F;
| [reply] [d/l] |
getstore() works fine for me.
But: applying binmode to the file handle you're saving to, should work, too.
p.s. You mentioned logging in, so maybe therefore, LPW::Simple is out. But, because mp3 files are quite big, I am not in favour of first retrieving the whole file, and then saving it, as some other people suggested. Instead, take a look at how LWP::Simple implements getstore(), and copy those few lines of code, then extend it to include the logging in. | [reply] |
If you want to keep using LWP::UserAgent how about something like this:
$user_agent->get($mp3_url,
":content_file" => $local_mp3_filename);
| [reply] [d/l] |
> aight now this is wat happens
Are you serious? I'm not normally a grammar-nazi, but if you're asking for help from professionals, you could at least make an attempt at writing professionally.
"Aight" is not a word, unless it is an archaic spelling of "eight". "Wat" is just odd -- don't you have an "h" key?
This isn't IRC, or an IM system... I have a very hard time respecting a questioner that doesn't show respect to those he questions.
radiantmatrix
require General::Disclaimer;
| [reply] |
YUB Dishing Jizzy G's whack rapp'n?
YU gotta B like all that, Yo?
Peas!
| [reply] |