Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Read (sysread) binary data into utf8 string

by vr (Curate)
on Apr 03, 2017 at 16:53 UTC ( #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
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? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2020-12-02 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (44 votes). Check out past polls.

    Notices?