Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: instantiating an SFTP object

by Aldebaran (Curate)
on Jun 13, 2017 at 02:06 UTC ( [id://1192643]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub get_html_filename{
    use Net::SFTP::Foreign;
    use File::Basename;
    ...
    my $html_file = $word.$new_num.'.'.$filetype;
    return $html_file;
    }
    
  2. or download this
    $ perl powell1.pl 
    title is powell
    values are [correct]
    ...
    old num is 2
    new file is powell3.html
    $
    
  3. or download this
    my $ls = $sftp->ls('/home/ftptest/inbound', no_wanted => qr/^\./ );
    my @names_and_sizes = map { { filename => $_->{filename}, size => $_->
    +{a}->size } } @$ls;
    
    # or...
    
    my %size = map { $_->{filename} => $_->{a}->size } @$ls;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 22:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found