use strict; use warnings; use Fatal qw(:void open); # set $! to some random number; we just want to see # if it is modified $! = 42; print "$!\n"; open my $f, '## Illegal byte sequence Can't open no_such_file: Illegal byte sequence at t.pl line 10. #### local(\$", \$!) = (', ', 0); #### Illegal byte sequence Can't open no_such_file: No such file or directory at t.pl line 10.