in reply to How do I convert a file with all hex to a file with all decimal values

No matter how many times you post this (at least three or four so far), it still won't make any more sense to most of us.

Please give an example of the input and desired output. "Hex" and "Decimal" are far too broad to narrow down any possible algorithm.

-- Randal L. Schwartz, Perl hacker

  • Comment on •Re: How do I convert a file with all hex to a file with all decimal values

Replies are listed 'Best First'.
Re: •Re: How do I convert a file with all hex to a file with all decimal values
by Anonymous Monk on May 21, 2002 at 20:55 UTC
    Sorry for the confusion. an example of the hex file would be
    40 30 4A 53 5B
    and an example of the decimal file would be
    64 48 74 83 91

    of course if you tried to open the hex file with notepad you would have jibberish, that is why I would like the conversion to dec. I know this can be done in PHP by using hexdec() and reading the whole file but I don't know how to do it in perl
    thank you
    and sorry for the confusion