in reply to Re: Formatting an output with printf
in thread Formatting an output with printf

If you want to be strict about your columns, then you might need to trancate strings if they are longer than the width of the column. Your example can be changed like this:

Z:\>perl use strict; printf STDOUT "[%-20.20s] [%20.20s]\n", 1000 .. 1001; ^D [1000 ] [ 1001] Z:\>

Leonid Mamtchenkov aka TVSET