use strict, etc. pp. my $max = @PICS; for my $i( 0 .. $max ) { $Pictures .= "PIC:
\"$CAPTIONS[$i]\"CAPTION:
$CAPTIONS[$i]"; }