title: How to clear the entry widget in a GUI after a button is pressed in Perl/Tk
body: <pre><code>use Tk;
  $filename  = 'configuration.txt';
  
  $mw = MainWindow-&gt;new;
  $mw-&gt;geometry("500x250");
  $f = $mw-&gt;Frame-&gt;pack(-side =&gt; 'bottom');
  
  $f-&gt;Button(-text =&gt; "Exit",-command =&gt; sub { exit; })-&gt;pack(-side =&gt; 'left');
  $f-&gt;Button(-text =&gt; "Save",-command =&gt; \&amp;save_file)-&gt;pack(-side =&gt; 'left');
  
  $t = $mw-&gt;Scrolled("Text", -width =&gt; 40, -wrap =&gt; 'none')-&gt;pack(-expand =&gt; 1, -fill =&gt; 'both');
  
  foreach (qw/IP_ADDRESS_SS PORT_NUMBER_CLIENT PROTOCOL_CLIENT PORT_NUMBER_SERVER PROTOCOL_SERVER/)
  {
                  $w = $t-&gt;Label(-text =&gt; "$_:", -relief =&gt; 'groove', -width =&gt; 30);
                  $t-&gt;windowCreate('end', -window =&gt; $w);
                  $w = $t-&gt;Entry(-width =&gt; 20, -textvariable =&gt; \$info{$_});
                  $t-&gt;windowCreate('end', -window =&gt; $w);
                  $t-&gt;insert('end', "\n");
  }
  $t-&gt;configure(-state =&gt; 'disabled'); # disallows user typing
  my $clear_text = $f-&gt;Button(-text =&gt; "Clear Text",-command =&gt; \&amp;clear_entry)-&gt;pack(-side =&gt; 'left',
                                                                                    -anchor=&gt;'se',
                                                                                    );
  
  MainLoop;
  
  ##### Subroutine #####
  sub save_file
  {
      print"$filename\n";
      $info = "Saving '$filename'";
      open (FH, "&gt;$filename");
      print FH $t-&gt;get("1.0", "end");
      $info = "Saved.";
  }
  sub clear_entry
  {
    $w-&gt;delete('0', 'end');
  }
  </code></pre>
  
  <p>This is the perk Tk program for simple data entry using label and entry widgets</p>
  
  <p>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</p>
  
  <p>Thanking u !
  Ranjith  </p>