#!/usr/bin/perl -w use Tk; use strict; foreach (@ARGV) { my $x = MainWindow->new; $x->title("$_"); $x->Label(-text => "$_")->pack(-fill => 'both'); $x->bind("", sub { exit }); my $y = $x->Scrolled("Text", -height => 10, -scrollbars => 'osoe')->pack(); open (F, "< $_") || die "Can't open"; while() { $y->insert('end', $_); } close(F); } MainLoop;