umm... I don't think you need to worry about perl converting a sting to a decimal. If I'm understanding what you want to do correctly, Perl will do that conversion autmatically - it all depends on how you use the value - Perl does its magic and silently converts it as required...
actually I don't understand why its necessary to do any converting if you're already passing into perl an octal. perhaps you could provide an example?