#! perl -slw use strict; use Win32::API; my $getChar = Win32::API->Import( 'junkdll', 'int getChar()' ) or die $!, $^E; print getChar() for 1 .. 10;