Here’s a reference page (cheat sheet) of Perl printf formatting options. Hopefully this list covers the most common Perl
printf printing options you’ll run into, or will at least point you in the right direction.
Here are several examples that show how to format strings with Perl and printf. I’ll use single quotes in all my
printf examples to help demonstrate left- and right-justification.