#! perl -slw use strict; use Win32::API::Prototype; ApiLink( 'Kernel32', q[ UINT SetErrorMode( UINT uMode ) ] ); SetErrorMode( 0x8000 ); ## Updated per ikegami's correction below. if( -e $ARGV[ 0 ] ) { print 'Found it?' } else { print 'Not found'; }