http://qs321.pair.com?node_id=528370


in reply to Virtual Memory Usage

You didn't specify, but if you're doing this on Linux you can use /proc/self/stat (see man proc for the details).

open my $stat,"<","/proc/self/stat" or die "Can't open /proc/self/stat +"; my ($vsz,$rss)=(split ' ',<$stat>)[22,23]; print "$vsz - $rss\n"

Or you could use the ps command or Unix::Process


All dogma is stupid.