in reply to How do I convert a hex file to a dec file

If the 'hex file' is a text file, try:
use strict; open (FH, 'hex_file.txt') or die $!; while (<FH>) { s/([a-f0-9]{2})/hex($1)/egi; print; }
However, this works for 8 bit hex numbers (00-FF). If your 'hex file' uses 16 bit numbers (0000-FFFF), then replace {2} with {4}. Likewise use {8} for 32 bit numbers.