The oct() function converts a string to an octal number.
Example:
#! C:\programfiles\perl\bin\perl
print "content-type: text/html\n\n";
print "Octal value of 65 is::", oct('65'),"\n";
print "<br>";
print "Octal value of 46 is::", oct('46'),"\n";
Result:
Octal value of 65 is::53
Octal value of 46 is::38
A Note
Simple introduction, basic CGI perl programming codes with examples.
Do send your feedback or suggestions on this tutorial.
This is a copyright content.