state $rsync_base_cmd = "rsync -avm -L --exclude='S/' --include='*/' --include='*.cpp' " . "--include='*.hpp' --exclude='*'"; # perform the copy my $command = "$rsync_base_cmd ${login}:${remoteDirectory} $localDirectory"; #print("\n$command\n"); # for debugging #`$command`; my $output = ""; my $pid = open3(undef, my $pipe, undef, $command) or confess("[_copy_component] Cannot perform rsync : $!"); while(<$pipe>){ $output .= $_; } # wait it completes to process eval { close ($pipe); }; waitpid($pid, 0);