Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: To convert hex number into string

by Athanasius (Abbot)
on Dec 02, 2012 at 13:03 UTC ( #1006722=note: print w/ replies, xml ) Need Help??


in reply to To convert hex number into string

Hello shyam123, and welcome to the Monastery!

Here is a one-liner that uses ikegami’s solution to accomplish your task:

perl -we "printf 'addr:0x%x,', 0x50000000 + $_ * 4 for 0 .. 255;"

(Note that this is for Windows. You will need to adjust the quotes for other platforms.)

Hope that helps,

Athanasius <°(((><contra mundum


Comment on Re: To convert hex number into string
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2015-07-02 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (46 votes), past polls