http://www.perlmonks.org?node_id=55605


in reply to one-liner hogs

How about this for processor churn?
perl -e '$_="abcd"x100000;while(1){y/abcd/bcda/}'
perl -e '@_=0..1000000;while(1){foreach(@_){++$_,--$_}}'
perl -e '@_=0..100000;while(1){foreach(@_){$a=$_/++$_;--$_}}'

The first exercises about about 8MB of memory fairly heavily.
The second beats up 64MB of memory with light mathops.
The third eats 9MB with a heavier math op.

Obviously you can tweak how much memory is eaten with monster number in there... HTH.

--
$you = new YOU;
honk() if $you->love(perl)