in reply to TK listbox escape text

What is the "\x{9}"??
That's a synonym for \t (documentation for this is buried in perlsyn perlop under "Quote and Quote-like Operators")

For your original problem, maybe the simplest solution would be using sprintf (as already proposed), however in conjunction with a monospaced font (e.g. Courier).