I have a file entitled numbers.txt. It comprises the numbers listed above. Using perl, how would place leading zero in front of each line; so the length of each line will not be greater than 10. I tried using scalars in perl, but the value of the scalar only returns the numbers of elements in the file when the file is assigned to an array.20188 18350 4005 127736 10291 4937 57500 150494
Please help!The following is the need output: 0000020188 0000018350 0000004005 0000127736 0000010291 0000004937 0000057500 0000150494
Edit by tye
In reply to Adding Leading Zeros by vanuatu10
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |