open( my $ssh_fh, "|-", 'ssh user@host...' ) or die "Could not ssh [$!]"; open( my $data_fh, ">", $file2 ) or die "Could not open [$file2] [$!]";