for ( my $Index = 0; $Index < 5; $Index++ ) { ... # code here that uses $Index }