in reply to File changes are not reflecting in perl tk
The only output to a file you have here is:
$dst ||= "$0.edit"; #in case user hits cancel warn "dst=$dst"; open (my $fh, '>',$dst) or die "$!\n"; print $fh $sublable->get("1.0","end");
Your original file is only read:
my $fh; open( $fh, '+<', "./test.txt" ) or die $!; my @contents = <$fh>; # print "@contents\n"; close( $fh );
Meaningful variable names would probably help you.
Update:
There may also be a problem here:
my $dst = $mw->getSaveFile( -initialdir => $ENV{HOME}, -defaultextension => '.in', -title => 'Save', -filetypes => [ [ 'myfiles' => '.in' ], [ 'All files' => '*' ], ], );
Please post the output from your code. My problems in determining what's going wrong here stem from:
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File changes are not reflecting in perl tk
by vr786 (Sexton) on Dec 01, 2010 at 11:59 UTC | |
by kcott (Archbishop) on Dec 01, 2010 at 12:11 UTC | |
by vr786 (Sexton) on Dec 01, 2010 at 12:51 UTC |