View Single Post
  #2 (permalink)  
Old 09-06-03, 06:57 AM
perleo perleo is offline
Coding Addict
 
Join Date: Jul 2003
Location: Ireland
Posts: 269
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote