in reply to Easiest way to do something only on first iteration of loop

c:\@Work\Perl\monks>perl -wMstrict -e "my $arrayref = [ 'The quick', 'brown fox jumped', 'over the lazy dog. +', ]; ;; for my $i (0 .. $#$arrayref) { printf ' ' x 6 if $i == 0; print qq{$arrayref->[$i] \n}; } " The quick brown fox jumped over the lazy dog.
Sweeten with
    ... unless $i == 0;
or
    ... if $i != 0;
etc. to taste. (Doesn't require 5.10+.)


Give a man a fish:  <%-{-{-{-<