Next | Trivial Utilities | 24 |
#!/usr/bin/perl
use LWP::Simple 'getstore'; use HTTP::Status (); my $url = shift or die "Usage: $0 url [file]\n"; my $file = shift; unless (defined $file) { require File::Basename; $file = File::Basename::basename($url); $file = "DEFAULT" unless defined $file; } unless (HTTP::Status::is_success(my $rc = getstore($url, $file))) { print HTTP::Status::status_message($rc), "\n"; exit 1; }
The file argument turned out to be useless
I never use it
In fact, I forgot that I had put it in
It would be overengineering, except that it hardly cost anything
Next | Menu | ![]() |
Copyright © 2012 M. J. Dominus |