Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 meditating upon the Monastery: (6)
As of 2014-09-03 03:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls