Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Reading zipped files with Net::SFTP

by amiss (Initiate)
on Mar 28, 2013 at 15:52 UTC ( #1025989=perlquestion: print w/ replies, xml ) Need Help??
amiss has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to read a zipped file on a remote server with Net::SFTP. Is there a way to add a pipe to do_read($handle)?

Comment on Reading zipped files with Net::SFTP
Replies are listed 'Best First'.
Re: Reading zipped files with Net::SFTP
by amiss (Initiate) on Mar 28, 2013 at 17:31 UTC

    Perhaps I spoke too soon. I ended up using Net::SFTP::Foreign and writing to a file handle like this:

    open my $handle, '| gunzip -c '; $ssh->get($remote, $handle) or die "get failed:".$ssh->error; print "opened handle \n";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1025989]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2015-09-04 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (139 votes), past polls