#!/var/www/cgi-bin/d/perl-5.16.0.out/bin/perl5.16.0 use CGI; my $q = CGI->new; print $q->header(); print $q->start_html('hello world'); my @keys = $q->param; printf "[[received %3d params; used %4dMbyte of RSZ]]
\n", scalar @keys, rsz(); print $q->end_html; # use PS to get the resident memory size of the current process sub rsz { return int($1 * 4096 / 1024 / 1024) if `ps -p $$ -o rsz` =~ /(\d+)/; return 0; }