#!/usr/local/bin/perl use strict; use warnings; my $var = 0; while($var < 10){ $var++; print "$var\n"; } for my($var = 0; $var < 10; $var++;){ print "$var\n"; }