I have a for loop I would like to alter so that when the iteration
reaches the last element in the array the varibale $lastmatch is
passed to printf instead of $match.

Does anyone have any suggestions?

my $match = "GE 0 AND ";
my $lastmatch = "GE 0";

for my $i (0 .. $#keyFields) {
  printf "%s %s", $keyFields[$i], $match,;
}

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to