while (my $bytesread = read(READFILE, my $buffer, 1024)) { syswrite(OUTFILE, my $buffer, 1024); }