# these vars could come from a cgi form my $c1 = "foo"; my $c2 = "fee"; my $c3 = "fuu"; doThis($c1, $c2, $c3); sub doThis { foreach (@_ ) { print; } }