Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Getting information about a remote file via SSH: how to escape the filename

by salva (Canon)
on Jun 27, 2013 at 12:24 UTC ( [id://1041003]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Net::OpenSSH;
    
    ...
    $ssh->die_on_error("unable to connect to remote host");
    
    my ($out, $err) = $ssh->capture2(ls => '-l', $remotefile);
    
  2. or download this
    use Net::SFTP::Foreign;
    use Data::Dumper;
    ...
    
    my $attr = $sftp->stat($remotefile);
    print Dumper $attr;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1041003]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-18 22:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found