http://qs321.pair.com?node_id=651298


in reply to Re: Bug : eval and accent
in thread Bug : eval and accent

The bug exists with use utf8 too.

use strict; use warnings; use Encode qw( encode ); use HTML::Entities qw( decode_entities ); # This eval should have no effect on subsequent evals. eval encode('utf-8', decode_entities( 'use utf8; my $var_with_♥_non_word;' )); my $string = 'abc'; eval '$string = "def"; 1' or die; if ($string ne 'def') { print("BUG! string should be 'def' but is '$string'\n"); } else { print("No bug\n"); }
BUG! string should be 'def' but is 'abc'