Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Read (sysread) binary data into utf8 string

by vr (Curate)
on Apr 03, 2017 at 16:53 UTC ( [id://1186852]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    C:\>perl -e "print qq(\xB5)" > data.bin
    
  2. or download this
    use strict;
    use warnings;
    ...
    seek $fh, 0, 0;
    $s2 = do { local $/; <$fh> };
    Dump $s2;
    
  3. or download this
    SV = PVMG(0xc149ec) at 0xc20dec
      REFCNT = 1
    ...
      PV = 0xc2e6a4 "\265"\0
      CUR = 1
      LEN = 10
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1186852]
Approved by stevieb
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found