$ /opt/perl/bin/perl -v This is perl, v5.8.7 built for cygwin-thread-multi-64int ... $ /opt/perl/bin/perl ttt sysread msg 1: rc=1 Eject the media then press Enter msg 2: cnt=99800000 rc=undef: 0: $ /opt/perl/bin/perl ttt read msg 1: rc=1 Eject the media then press Enter msg 2: cnt=99806953 rc=undef: 9: Bad file descriptor Close failed: 9: Bad file descriptor $ /opt/perl/bin/perl ttt readline msg 1: len=5 Eject the media then press Enter msg 2: cnt=99809957 rc=undef: 9: Bad file descriptor