{ # start a block to limit the variable's scope my $maybe_a_slash = ''; # default to no slash $maybe_a_slash = '/' if $i; # make it a slash if counter has incremented print "$a[$i]$maybe_a_slash$c1[$w]"; } # end the block