Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Print hex data in ASCII format as is

by yildiza (Initiate)
on Jun 19, 2012 at 12:22 UTC ( [id://977054]=perlquestion: print w/replies, xml ) Need Help??

yildiza has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I want to read hex data from a binary file and print it on the screen as is. i.e., if data -> ffa3 After printing this on the screen, it should show ffa3 NOT the ASCII equivalents. How can I achieve that using pack or unpack? Thank you.

Replies are listed 'Best First'.
Re: Print hex data in ASCII format as is
by moritz (Cardinal) on Jun 19, 2012 at 12:29 UTC
      Thank you for your answer. It worked. unpack("H*", $data)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (10)
As of 2024-04-18 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found