From Progzoo
Jump to navigation Jump to search

You can format numbers using the sprintf function. See Perl:Format Printing for details of some other options that are available.

You can build a string using sprintf. The %8d place holder will ensure that the number takes exactly 8 spaces.

The output with "Number:%8d" prints a decimal:

Number:   12345

[Font] [Default] [Show] [Resize] [History] [Profile]