Help for this page

Select Code to Download


  1. or download this
     for my $i(@contents) {
       if ( -f "$from/$i" ) {
         copy("$from/$i","$to/$i");
        }
     }
    
  2. or download this
      my( $uid, $gid ) = (stat $i)[4,5];
      copy "from/$i", "$to/$i";
      chown $uid, $gid, "$to/$i" or die "chown $to/$i (uid=$uid, gid=$gid)
    + failed: $!";