for ( my $Index = 0; $Index < 5; $Index++ ) { ... # code here that uses $Index } #### { # Start black of code .. .. { # Start another block of code my ( $Index, $NodeNumber ); .. .. } .. .. }