Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How to make an ascii flower variable

by anneli (Pilgrim)
on Oct 19, 2011 at 01:31 UTC ( #932270=note: print w/ replies, xml ) Need Help??


in reply to How to make an ascii flower variable

use utf8;

$✿ = "works for me?";

(yes it's not ASCII but I mean really)


Comment on Re: How to make an ascii flower variable
Re^2: How to make an ascii flower variable
by rgiskard (Hermit) on Oct 19, 2011 at 04:38 UTC
    I cut and pasted that code into emacs. Initially things looked good (the flower appeared to be a flower variable etc.). It didn't work when I ran it. How exactly is this working for you?

    Code:
    use utf8;

    $✿ = "works for me?";

    Output:
    perl fleur.pl Malformed UTF-8 character (unexpected end of string) at fleur.pl line +3. Unrecognized character \x9C; marked by <-- HERE after $\342<-- HERE ne +ar column\ 2 at fleur.pl line 3.

      Hmm, how odd! It ran without complaint or error at work; when I try it at home now, I get the same error as you (which is documented as being correct behaviour!).

      I'll have to try again at work tomorrow! ;-)

        Of course, we can always put the flower in a vase:

        use utf8;
        no strict 'refs';
        ${"✿"} = "works for me?";
        say ${"✿"}

        Good Day,
            Dean

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2014-08-27 18:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (248 votes), past polls