- or download this
sub get_object
{
...
$url = shift();
$referer = shift();
$save_path = shift();
- or download this
my($agent, $url, $referer, $save_path) = @_;
# args:
...
# $referer - referer to grab URL with (optional)
# $save_path - path to save image/etc. to (optional)
my($request, $response, $content); # for http stuff
- or download this
# ...
$save_path ? print("Getting picture $url...") : print("Getting inf
+o from $url\n");
- or download this
print $save_path ? "Getting picture $url..." : "Getting info from
+$url\n";
- or download this
print defined $save_path ? "Getting picture $url..." : "Getting in
+fo from $url\n";
- or download this
my $type = $response->headers->header("Content-Type");
if (defined $type and $type =~ /^text/) {
...
} else {
# ... probably not text
}