http://www.perlmonks.org?node_id=1006722


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