in reply to TK::ProgressBar and update memory build up

An update to my last post. The pure perl script isnot quite correct. Should have called a sub to read the file like this:
#!/usr/bin/perl use warnings; use strict; my $in_file="\\in_dile\.txt"; my $count_runs=0; while (1) { $count_runs++; read_file(); print "run $count_runs\n"; <>; } sub read_file { my @data; open MYFILE ,$in_file or die "Could not open file to read:$in_file +\n"; while(<MYFILE>) { my $temp=$_; chomp $temp; my @array=split("\t",$temp); push(@data,[@array]); } close MYFILE; }

An like in the Perl/TK app, the memory leak is there. Maybe I am doing something wrong with the anonymous array. But again, should the local vars be cleared when going out of scope in every call to the sub.