Help for this page

Select Code to Download


  1. or download this
         1    #!/usr/bin/env perl
         2    use strict;
         3    use warnings;
    ...
        43    $ftp->login($user, $pass);
        44    $ftp->cwd($dir_name);
        45    my @dir = $ftp->ls();
    
  2. or download this
    ~/bin# ./test.pl
    "my" variable $host masks earlier declaration in same scope at ./ftp-t
    +est.pl line 42.
    "my" variable $ftp masks earlier declaration in same scope at ./ftp-te
    +st.pl line 43.
    "my" variable $user masks earlier declaration in same scope at ./ftp-t
    +est.pl line 43.
    "my" variable $pass masks earlier declaration in same scope at ./ftp-t
    +est.pl line 43.
    "my" variable $ftp masks earlier declaration in same scope at ./ftp-te
    +st.pl line 44.
    
  3. or download this
    # Append a '/' to directories if needed
    if ($target_dir ~! m{\/$}) { $target_dir .= '/'; }
    if ($tmp_dir ~! m{\/$})  { $tmp_dir .= '/'; }
    
  4. or download this
    # Append a '/' to directories if needed
    $target_dir .= '/' unless ($target_dir =~ m{\/$});
    $tmp_dir .= '/' unless ($tmp_dir =~ m{\/$});