in reply to Yet Another Stupid CGI Question

Instead of putting the foreach loop in the print statement itself you could always do something like this

my @array = ( 4,5,3,4,5); print function(),"\n"; sub function { my $rv; foreach my $item (@array) { $rv .= $item . "\t"; } return $rv; }

and put the foreach loop in a sub (or anon. sub). I know the example above looks silly but i had to work the foreach in to illustrate my point. HTH