@x = (1,2,3,4,5,6); print STDOUT join(" ", map { sprintf "%7d", $_ } @x), "\n"; #outputs: 1 2 3 4 5 6