How to clear the entry widget in a GUI after a button is pressed in Perl/Tk..........
use Tk;
$filename  = 'configuration.txt';

$mw = MainWindow->new;
    $mw->geometry("500x250");
    $f = $mw->Frame->pack(-side => 'bottom');

    $f->Button(-text => "Exit",-command => sub { exit; })->pack(-side => 'left');
    $f->Button(-text => "Save",-command => \&save_file)->pack(-side => 'left');

    $t = $mw->Scrolled("Text", -width => 40, -wrap => 'none')->pack(-expand => 1, -fill => 'both');

    foreach (qw/IP_ADDRESS_SS PORT_NUMBER_CLIENT PROTOCOL_CLIENT PORT_NUMBER_SERVER PROTOCOL_SERVER/)
    {
                    $w = $t->Label(-text => "$_:", -relief => 'groove', -width => 30);
                    $t->windowCreate('end', -window => $w);
                    $w = $t->Entry(-width => 20, -textvariable => \$info{$_});
                    $t->windowCreate('end', -window => $w);
                    $t->insert('end', "\n");
    }
    $t->configure(-state => 'disabled'); # disallows user typing
    my $clear_text = $f->Button(-text => "Clear Text",-command => \&clear_entry)->pack(-side => 'left',
                                                                                      -anchor=>'se',
                                                                                      );

MainLoop;

##### Subroutine #####
sub save_file
{
    print"$filename\n";
    $info = "Saving '$filename'";
    open (FH, ">$filename");
    print FH $t->get("1.0", "end");
    $info = "Saved.";
}
sub clear_entry
{
  $w->delete('0', 'end');
}

This is the perk Tk program for simple data entry using label and entry widgets

Here,what i want is if click the clear text button i want to clear all the entry in the entry widget, 
Plz help how to do this

Thanking u !
Ranjith  
How to clear the entry widget in a GUI after a button is pressed in Perl/Tk..........
===

use Tk;
$filename  = 'configuration.txt';

$mw = MainWindow->new;
    $mw->geometry("500x250");
    $f = $mw->Frame->pack(-side => 'bottom');

    $f->Button(-text => "Exit",-command => sub { exit; })->pack(-side => 'left');
    $f->Button(-text => "Save",-command => \&save_file)->pack(-side => 'left');

    $t = $mw->Scrolled("Text", -width => 40, -wrap => 'none')->pack(-expand => 1, -fill => 'both');

    foreach (qw/IP_ADDRESS_SS PORT_NUMBER_CLIENT PROTOCOL_CLIENT PORT_NUMBER_SERVER PROTOCOL_SERVER/)
    {
                    $w = $t->Label(-text => "$_:", -relief => 'groove', -width => 30);
                    $t->windowCreate('end', -window => $w);
                    $w = $t->Entry(-width => 20, -textvariable => \$info{$_});
                    $t->windowCreate('end', -window => $w);
                    $t->insert('end', "\n");
    }
    $t->configure(-state => 'disabled'); # disallows user typing
    my $clear_text = $f->Button(-text => "Clear Text",-command => \&clear_entry)->pack(-side => 'left',
                                                                                      -anchor=>'se',
                                                                                      );

MainLoop;

##### Subroutine #####
sub save_file
{
    print"$filename\n";
    $info = "Saving '$filename'";
    open (FH, ">$filename");
    print FH $t->get("1.0", "end");
    $info = "Saved.";
}
sub clear_entry
{
  $w->delete('0', 'end');
}

This is the perk Tk program for simple data entry using label and entry widgets

Here,what i want is if click the clear text button i want to clear all the entry in the entry widget, 
Plz help how to do this

Thanking u !
Ranjith  