|
|
elsif ($opt{method} eq 'scp') | elsif ($opt{method} eq 'scp') |
{ | { |
my $tmp=$tmpfile; | my $tmp=$tmpfile; |
open(OUTPUT,">$tmp") || die "Can\'t create file $tmp: $!\n"; |
use Fcntl; |
|
sysopen(OUTPUT,$tmp,O_WRONLY|O_EXCL|O_CREAT) || die "Can\'t create file $tmp: $!\n"; |
if (syswrite(OUTPUT,$buff) != length($buff)) | if (syswrite(OUTPUT,$buff) != length($buff)) |
{ | { |
die "Error when writing data to $tmp: $!\n"; | die "Error when writing data to $tmp: $!\n"; |