
r.ranjithme
New User
Oct 26, 2010, 4:28 AM
Post #1 of 2
(3645 views)
|
perl tk : How to store inputs from lable widget
|
Can't Post
|
|
#! /usr/bin/perl -w use Tk; $filename = '1.txt'; $mw=MainWindow->new(); $s = $mw->Button(-text => "Save", -command => \&save_file)->pack(-side => 'right', -anchor => 'e'); foreach(1..5) { $mw->Entry()->pack; } MainLoop; sub save_file { $info = "Saving '$filename\'"; open (FH, ">$filename"); print FH $s->get("1.0", "end"); $info = "Saved."; } In this code i want to store the inputs from lable widgets in to 1.txt file Please reply ASAP Thanks in advance
|