sub go_to { my $sw = $mw->DialogBox(-title => "Go To Line", -buttons => ["Go"]); $sw->add("Entry", -text => \$line_number)->pack(); my $response = $sw->Show(&scroll_line); sub scroll_line { $line_number = $line_number - 1; my $calc = $line_number/$line_count; $t->yviewMoveto($calc); $line_number = $line_number + 1; } }