#!/usr/bin/perl use strict; use warnings; use Tk; my @numbers = ( -1.22, 47.11, 42, 13.5, 10000.2, -213); for (@numbers) { $_ = sprintf "%9.2f", $_; } my $mw = new MainWindow; my $lb = $mw->Listbox(-font => '{Courier New} 12 {normal}')->pack(); $lb->insert('end', "$_") for (@numbers); MainLoop();