#!/usr/bin/perl -w
use strict;
my $size = 50;
binmode(STDOUT, ":utf8");
open(my $rf, '<', '/dev/random');
while ($size) {
my $o;
print STDERR "$size random bytes to read.\n";
read $rf, $o, 1;
if ($o ne "\n" && $o ne "\r") {
print $o;
$size--;
}
}
close($rf);