#!/usr/bin/perl use warnings; use strict; use Tk; my $input = ''; my $m = tkinit; $m->Entry( -show => "*", -textvariable => \$input, )->pack; $m->Button( -text => 'Quit', -command => sub { $m->destroy }, )->pack; MainLoop; print "input was: $input\n";