http://www.perlmonks.org?node_id=388314


in reply to A du(1) real-time sorter using Curses

Small bug in the name method.

Change

my $index = shift || -1;
to
my $index = shift; $index = -1 unless defined $index;
as 0 is a valid input for the name method to get the name of element 0