in reply to How do I pass a sequence of variable names to a subroutine one at a time?
param() returns the names of all the parameters when called without any arguments. See the CGI docs.use strict; foreach ($query->param) { get_cand_info($_) if /^c\d+$/; } sub get_cand_info() { my $cd = shift; my $value = $query->param($cd); # blah }
is rather unsafe. Read perlsec!$pq_out = `/opt/bin/pq -o '%last:%first:%loc:%room:%tel:%id' hrid=$c1` +;
|
|---|