I have a cgi script where I need to be able to parse linux file permissions. The problem is that if a permission comes as "764" it is treated as a base 10 scalar in perl. In other words it is represented as 1374 in octal while it is meant to represent 764 in octal. I am not sure what conversion routine to call to say, take a var as a string and convert it to octal? If you use sprintf, it will give the wrong result as it will return 1374, the octal conversion I showed above.