$ perl -Mwarnings -Mstrict -e'BEGIN { *! = \1; open my $fd, "< nonexistent"; print "$!\n"; }' 1 #### $ perl -e'$! = 1; print "$!\n"' Operation not permitted