in reply to read file in perl/tk( text )

Classic perltrap, operator precedence of ||
open my $fh,'<','/home/terrance/Desktop/perl/record.txt' || die $!;
is
open my $fh,'<','/home/terrance/Desktop/perl/record.txt';
because
'/home/terrance/Desktop/perl/record.txt' || 'also true';
always returns '/home/terrance/Desktop/perl/record.txt'

You want to use autodie; or use or die $!

The other thing you want to do , if you want to cut your development time in half, is Use strict warnings and diagnostics or die, after you add that, you'll find some typos you need to fix