in reply to How do I pass a sequence of variable names to a subroutine one at a time?
How about:
param() returns the names of all the parameters when called with any arguments. See the CGI docs.use strict; foreach ($query->param) { do_stuff($_) if /^c\d+$/; } sub do_stuff() { my $cd = shift; my $value = $query->param($cd); # blah }
Originally posted as a Categorized Answer.
In Section
Seekers of Perl Wisdom