my $scpcp = "scp $rfilewithpath $destdir"; my $ret = system("$scpcp"); print STDERR "scp return code is $ret\n";