Is there a way of downloading into a filehandle or pipe so that I don't have to download the entire large file?use File::Fetch; use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError +); # Download a very large zipfile my $ff=File::Fetch->new(uri => "https://tranco-list.eu/top-1m.csv.zip" +); my $scalar; my $where=$ff->fetch( to => \$scalar ) or die $ff->error; # Print the first 10 lines my $z=new IO::Uncompress::AnyUncompress(\$scalar); for (my $i=0;$i<10;$i++) { my $line=$z->getline(); $line=~s/\r|\n//g; print $line,"\n" }
In reply to Fetch URL Contents to File Handle by grahjenk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |