Thanks for the feedback, although the problem is I don't know the array of files to check when i start the script.

The problem here is that i'm collecting information on remote computers, not knowing weather or not they are powered on. By the time the script finds out which of the 10K+ computers are online, the information is already outdated. That's why the idea is to check if a computer is online and gather information from one computer at a time.

I've looked on the web for other methods and i found the module Win32::File::VersionInfo. I don't know yet if this would solve the memory issue. I do know i had a problem transfering my parameters to that other sub: my $file=GetFileVersionInfo (@_); doesn't work. I'm calling this sub exactly the same way as in the first post.