in reply to listbox refresh with Tk::After

Yeah, the Tk::after and Tk::repeat modules can be a source of confusion for a beginner. There is no perldoc for Tk::repeat, yet it is what is most often used. If you read perldoc Tk::after, you will see
$id = Tk::After->new($widget, tid, $time, ’once’, callback); $id = Tk::After->new($widget, tid, $time, ’repeat’, callback); $id->cancel; once or repeat specifies whether the timer is a one-time-after event, or a repeating repeat event.
It just became a shortcut to write
$id = $mw->repeat( 10, sub{} );

As far as your script goes, you might want to checkout the listbox -textvariable option to tie an array

#!/usr/bin/perl -w use strict; use Tk; my $mw = Tk::MainWindow->new( -title => 'Listbox' ); my @array = ('A'..'Z'); my $lb = $mw->Scrolled('Listbox', -listvariable => \@array, )->pack(); my $b = $mw->Button( -text => 'Delete B', -command => sub{ del_it('B') }, )->pack(); MainLoop; sub del_it { my $remove = shift; @array = grep { $_ ne 'B' } @array; } ##################################################################
that way, you can just load your array from the file
open FH, '< myfile' or warn "$!\n" ; my (@array) = <FS>; close FH; $listbox->update; # may not be needed

I'm not really a human, but I play one on earth. Cogito ergo sum a bum