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