iam not really sure what your looking for but to view a file..
use Tk;
$mw = MainWindow->new();
$text = $mw->Text()->pack(-pady => '10', -padx => '10');
open(FILE, "FILE PATH) or die "Cant open file: $!";
@file = <FILE>;
$text -> insert('end', @file);
MainLoop;
That will print the contents of the text file into a box.