Is it better if I do this:
foreach my $item ( @array ) { if ( $bool ) { .. code .. } else { .. code .. } }
or
<
I suggest you time both and see for yourself, but I don't expect the difference to be huge.