use Win32API::File qw( createFile OsFHandleOpen ); my $h= createFile( "//./pipe/MyPipe", "r" ) or die "Can't read from pipe/MyPipe: $^E\n"; $^E= 0; # Clear possibly misleading errors out. OsFHandleOpen( FILE, $h, "r" ) or die "Can't associate Perl handle: $! ($^E)\n";