in reply to fastest way to open a file and storing it?

This is a case where you may want to go to the system. The ps system call will take a snapshot of the processes on the system. The ephemeral nature of procfs does not interfere, as it does in your method. The ps call can have its output tailored to give what you want. Check your local 'man ps' to see if the options match in your version of ps.

my $psout = `/bin/ps -A h o uid,vsize`; my @procs = map {[split]} split "\n", $psout; # To get total vm usage by uid, my %vm_usage; $vm_usage{$_->[0]} += $_->[1] for @procs;

After Compline,
Zaxo