print("Before setting command: $path\n"); $cmd = "ldd $path"; print("Before running command\n"); ($stdout, $stderr, $exit_status) = capture { system($cmd); }; print("After running command\n"); #### Before setting command: /proc/self/fd/1 Before running command #### Before setting command: /proc/self/fd/1 Before running command ^CAfter running command #### print("Before setting command: $path\n"); $cmd = "$LDD $path"; print("Before running command\n"); $stdout = `$cmd`; #($stdout, $stderr, $exit_status) = capture { system($cmd); }; print("After running command\n"); #### Before setting command: /proc/self/fd/1 Before running command ldd: /proc/self/fd/1: not regular file After running command