Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2015-07-06 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (81 votes), past polls