in reply to Re^4: How to download or run exe file using rest client.
in thread How to download or run exe file using rest client.
Hello again Anonymous Monk,
It seems the file you are downloading in not executable. On this case it is not related to Perl but you need to get a valid file.
I would also suggest a few minor configurations to your script to reduce the possibility of an error:
#!/usr/bin/perl use strict; use warnings; use LWP::Simple; my $url = "URL"; my $file = "BCM_console.exe"; my $code = getstore($url, "$file"); die "Error: $code on $url" unless is_success($code);
Hope this helps, BR.
|
|---|