use strict; use warnings; use Fcntl qw( F_SETFL O_NONBLOCK ); my $fh = \*STDIN; fcntl($fh, F_SETFL, O_NONBLOCK) || die "$!\n"; sysread($fh, my $buf, 1); #### Your vendor has not defined Fcntl macro F_SETFL, used at ...