##
use strict;
use warnings;
open my $fh, "<", "bogus file" or die "unable to open file $!";
####
use strict;
use warnings;
print "this is test2";
####
C:....PerlProjects>perltest1.pl
unable to open file No such file or directory at C:......\PerlProjects\perltest1.pl line 4.
C:....PerlProjects>IF 2 NEQ 0 EXIT /B 2