Dear Buddies,
My query may be pretty simple but I am stuck because of it. Please give me a solution.
Query is I have a variable (say $A) which can have any number starting from 1 digit to 8 digit i.e. any number from 1 to 99999999.
Now, I want output as 8 digit even if variable has only 1 digit. IT can be accomplished by addting Zeros (0) before the value of $A.
E.g 1)
$A=1
then output should be printed as 00000001
E.g 2)
$A=1234
then output should be printed as 00001234
E.g. 3)
$A=1234567
then output should be printed as 01234567
E.g 4)
$A=12345678
then output should be printed as 12345678 (As it is because it is already 8 digit number)