K
kj
I'm looking for the "moral equivalent" of the (fictitious) `openremote`
function below:
my $handle = openremote( 'http://some.domain.org/huge.tsv' ) or die $!;
while ( <$handle> ) {
chomp;
# etc.
# do stuff with $_
}
close $handle;
IOW, I'm looking for a way to open a read handle to a remote file
so that I can read from it *line-by-line*. (Typically this file
will be larger than I want to read all at once into memory. IOW,
I want to avoid solutions based on stuffing the value returned into
LWP::Simple::get into an IO::String.)
I'm sure this is really basic stuff, but I have not been able to
find it after a lot of searching.
TIA!
kj
function below:
my $handle = openremote( 'http://some.domain.org/huge.tsv' ) or die $!;
while ( <$handle> ) {
chomp;
# etc.
# do stuff with $_
}
close $handle;
IOW, I'm looking for a way to open a read handle to a remote file
so that I can read from it *line-by-line*. (Typically this file
will be larger than I want to read all at once into memory. IOW,
I want to avoid solutions based on stuffing the value returned into
LWP::Simple::get into an IO::String.)
I'm sure this is really basic stuff, but I have not been able to
find it after a lot of searching.
TIA!
kj