#! /usr/bin/perl use strict ; use warnings ; my $i=0 ; while (1) { print "Testing $i\n" ; $i++ ; sleep(1); } #### perlcc -o compiled while.pl #### ps axo %cpu,%mem,command | grep "while\|compiled" 0.0 0.0 /usr/bin/perl ./while.pl 0.0 0.1 ./compiled