open my $fh, "<", $infile or die cannot open $infile $!";; read $fh, $out, 100; # reads 100 bytes from the file