Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Delete files from server after downloading using SFTP

by hbm (Hermit)
on Jun 11, 2013 at 21:15 UTC ( #1038341=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
       sub removeRemoteFile {
          my $file = shift;
    ...
          }
          return FALSE;
       }
    
  2. or download this
       sub removeRemoteFile {
          my %args = @_;
    ...
          }
          return FALSE;
       }
    
  3. or download this
       sub getFile {
          my %args  =  @_;
    ...
          unlink "$args{LOCAL}/$name"   if -f "$args{LOCAL}/$name";
          return FALSE;
       }
    
  4. or download this
       for my $file ( ... ) {
          if (getFile( ... )) {
    ...
             warn "Couldn't download $args{REMOTE}/$file!\n";
          }
       }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038341]
help
Chatterbox?
[talexb]: Nice article on Perl by Ovid on TechBeacon: https://techbeacon .com/perl-not-dead -it-was-early-web- novices-gave-it- bad-name
[choroba]: that's from the last year, right?
[choroba]: Pretty similar to his talk at YAPC::EU 2016

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2017-09-19 18:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (226 votes). Check out past polls.

    Notices?