#!/usr/bin/perl use warnings; use strict; use LWP::Simple; my $file = 'test.txt'; my $content = get('http://www. google.com'); open FH, " >", "$file" or die "Error: $!\n"; print FH $content until -s $file >= 25; # I routinely include code to check for a successful closing # of the filehandle since a hardware error could occur. close FH or die "Error: $!\n";
In reply to Re: Download only part of a file from the web
by DigitalKitty
in thread Download only part of a file from the web
by funstence
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |