Business-Shipping-DataTools
view release on metacpan or search on metacpan
lib/Business/Shipping/DataTools.pm view on Meta::CPAN
sub download_to_file
{
my ( $url, $file ) = @_;
trace "( $url, $file )";
return unless $url and $file;
eval {
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET => $url);
open( NEW_ZONE_FILE, "> $file" );
print( NEW_ZONE_FILE $ua->request($req)->content() );
close( NEW_ZONE_FILE );
};
warn $@ if $@;
return;
}
=item * _unzip_file( $zipName, $destination_directory )
( run in 0.394 second using v1.01-cache-2.11-cpan-de7293f3b23 )