in reply to How do I pass a sequence of variable names to a subroutine one at a time?

@cand_info = map {get_cand_info($query->param($_))} grep {/^c/} $query +->param();
This will find all CGI parameters which begin with the letter 'c', pass their values to your subroutine one-at-a-time, and result in @cand_info holding all return values from those subroutine calls.

Did I understand the question?

Russ
Brainbench 'Most Valuable Professional' for Perl

  • Comment on Re: How do I pass a sequence of variable names to a subroutine one at a time?
  • Download Code