sub make_table(){ $table=$page3->Scrolled('HList',-columns=> 2,-header=> 1,-width=>31,-height=>9,-font=>"Times 12",-scrollbars=>'osoe') ->place(-x=> 280, -y=> 136); $table ->headerCreate(0, -text=>" Directory "); $table ->headerCreate(1, -text=>" Size "); open(BATCHIN, "){ chomp; @arraybatch = split ' '; #put each line in an array to use when I invoke the size calculation method foreach (@arraybatch){ my $cleansource = $source; $cleansource .= "\\"; $cleansource .= $_; #append the \\ and the user directory $sourceResult = dir_size($cleansource, $sourceDirInfo,);#get the size of the directory $sbyte += $sourceDirInfo->{DirSize}; #add the bytes of all of the directories $sourceSize = best_convert($sourceSizeUnit, $sourceDirInfo->{HighSize}, $sourceDirInfo->{LowSize},);#converts my $s = $sourceSize;#append the size $s .= $sourceSizeUnit;#appends the unit to the size $table->add($_); $table->itemCreate($_, 0, -text => $_); $table->itemCreate($_, 1, -text => $s); }#foreach }#while }#make_table