use strict; eat('Ahh ... recursion!'); sub eat { my $food = shift; if ($food) { print "$food\n"; eat (substr($food,0,length($food)-1)); } else { # base case return; } }