Thanks for those replies. I do need to clarify some parts of my post. I am used to coding strongly typed languages like C, C++ and Java. What I am doing in Java is constructing a String array. To do this I am converting various char, integer and an octal values to their string representation and placing these into the String array. This simplifies the passing of these arguments to the called Perl code - one argument to be passed rather than several. The octal value, now converted to its String representation, is what is confusing me. I want to convert this 'String' back to its original octal state. I am unsure how to do it. Like say 0644 convert that from String to decimal gives 644. Convert that decimal to octal gives 1204. Not what I want. I want to keep the original octal value - 644.
Java provides a method in class Integer, Integer.parseInt(String, int) where String would be the octal value as a String and int is a radix giving the base to convert to, base 8 in my case. Does Perl provide this functionality?