#!/usr/bin/perl use strict; use warnings; my $variable1; my $variable2; ... ... ### Rest of the code follows from below ... ... ### End of the code #### #!/usr/bin/perl use strict; use warnings; .... .... ... for (my $variable1=0; $variable1 <= $#someArray; $variable++) { ### Do something here ... ... } ... ### Rest of the code here ...