Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^6: Default encoding rules leave me puzzled...

by ikegami (Pope)
on Jun 22, 2014 at 00:18 UTC ( #1090804=note: print w/replies, xml ) Need Help??

in reply to Re^5: Default encoding rules leave me puzzled...
in thread Default encoding rules leave me puzzled...

produces a sequence of octets ENCODED as Latin-1 for code points 0 - 255

It gives the same result, yes, but only by virtue of Unicode code points being rather similar to iso-latin-1, not because print does any encoding.

print does this:

- If any of the elements of the string is larger than 255, - Warn "wide character". - Encode the string using utf8. - For each element of the string, - Print that number as a byte.

The operator plus expects numbers, just like print, right?

Two individual numbers, yes. print takes two strings of them. The bitwise operators accept either.

$ perl -E'say "ABC" | " "' abc

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1090804]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2018-06-24 08:18 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.