Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Bug : eval and accent

by ikegami (Pope)
on Nov 16, 2007 at 19:19 UTC ( #651298=note: print w/replies, xml ) Need Help??


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'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://651298]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2021-01-18 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?