use strict; use warnings; no warnings 'redefine'; for ( [ "Symbol, use utf8: " => "use utf8; sub ∃ {}" ], [ "Symbol, no utf8: " => "no utf8; sub ∃ {}" ], [ "Russian, use utf8: " => "use utf8; sub трщь {}" ], [ "Russian, no utf8: " => "no utf8; sub трщь {}" ], ) { print $_->[0], eval "$_->[1]; 1" ? "Success\n" : $@; } #### Symbol, use utf8: Illegal declaration of anonymous subroutine at (eval 1) line 1. Symbol, no utf8: Illegal declaration of anonymous subroutine at (eval 2) line 1. Russian, use utf8: Success Russian, no utf8: Illegal declaration of anonymous subroutine at (eval 4) line 1.