I'm a novice to perl, and I'm wondering if there is a way to add trailing spaces to all lines in a file that are less than x characters long in perl. I can do this in bash using the line: awk '{printf("%-76s\n", $0)}' infile > outfile Where 76 is the number of characters I need to be in each line. I want to add this to a longer perl script. I'm sure there's an easy way to translate this into perl executable language, but I don't know it. Any help will be much appreciated!
In reply to Trailing spaces to lines less than x characters by mlsmit10
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |