1#!/usr/local/bin/perl -w
2use strict;
3use Tk;
4use Tk::Font;
5
6my $mw = MainWindow->new;
7my $font = $mw->Font(family  => 'courier', point => 140, weight => 'bold', slant => 'r');
8my $lb = $mw->Scrolled('Listbox', -font => $font)->pack(-expand => 1, -fill => 'both');;
9$mw->Button(-text => 'Quit', -command => [destroy => $mw])->pack;
10
11opendir(DIR,".") || die "Cannot opendir '.':$!";
12foreach (sort readdir(DIR))
13 {
14  my $size = (stat($_))[7];
15  $lb->insert('end',sprintf("%6d $_",$size));
16 }
17
18MainLoop;
19
20