use Spinner.pm; for (1 .. 1000) { Spinner::spin(); } sub spin { print "i am the second spin() sub\n"; }