Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Bug : eval and accent

by ikegami (Patriarch)
on Nov 16, 2007 at 19:19 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://651298]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-20 00:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found