I think you are going in the whole wrong direction. Coordinated arrays is not a good idea for starters. See if you can follow how/why this works and go from there
use strict; use warnings; my @sets; push @sets,{name=>'Country',api=>'get_country()'}; push @sets,{name=>'State' ,api=>'get_state()'}; push @sets,{name=>'fake' ,api=>'get_fake()'}; my %subs; $subs{'get_country()'}=\&get_country; $subs{'get_state()'} =\&get_state; for my $set (@sets) { my $vname=$set->{name}; my $api =$set->{api}; my $call=$subs{$api}; my $res; if (defined $call) {$res=&$call;} $set->{res}=$res; } use Data::Dumper; print Dumper (\@sets); exit; sub get_country{ return 'USA'; } sub get_state{ return 'FL'; }
In reply to Re: Supplementary Google GA question
by huck
in thread Supplementary Google GA question
by Laurielounge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |