CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: memory issue with my script: Edit Log



lukdk
Novice

Jun 19, 2012, 9:01 AM


Views: 1379
memory issue with my script

Hello,


I'm having an issue with trying to run a script. It runs for a while, gathers information for some time untill i get the error message: Out of memory!

When i check my task manager i see perl.exe keeps taking more and more momory (over 100MB), unless i comment out the following line:


Code
print RESULT "$computer	",&versioncheck("\\\\$computer\\c\$\\windows\\system32\\msi.dll"),"\n";


This line is used in a ending loop. If I comment this out, perl.exe only uses around 9MB which seems more realistic.

This is the code for the sub:


Code
use Win32::Exe qw(); 
sub versioncheck{
my $exe = Win32::Exe->new(@_);
my @exe = $exe->version_info->get('FileVersion');
return $exe[0];
}



(This post was edited by lukdk on Jun 19, 2012, 9:02 AM)


Edit Log:
Post edited by lukdk (Novice) on Jun 19, 2012, 9:02 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives