reads n bytes from $handle. If 0 bytes are read $null will be returned.
$ readb([$handle], -1, [est_size])reads bytes from handle until none are left. Returns $null when 0 bytes are read.
$handle - the handle to read from (defaults to stdin/stdout)
n - number of bytes to attempt to read
est_size - estimated number of bytes. larger numbers may help performance.
a scalar string containing all of the bytes read. If 0 bytes are read $null is returned instead.
# copy.sl [original file] [new file] $in = openf(@ARGV[0]); $data = readb($in, -1); $out = openf(">" . @ARGV[1]); writeb($out, $data); closef($in); closef($out);