#!/usr/local/bin/perl # this is an example of using the while loop in perl # it works similar to the while loop in C $num = 0; while ($num < 10) { print "Number $num\n"; $num++; }