Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How do I pass a sequence of variable names to a subroutine one at a time?

by Russ (Deacon)
on Oct 06, 2000 at 05:36 UTC ( [id://35513]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://35513]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found