$api_name[0] = 'get_country()'; $var_name[0] = 'Country'; #### for my $row ( @{ $res->rows } ) { $Country = $row->get_country(); $sql = "insert into table set country = '$Country'... etc #### $[$var_name[0]] = $row->$[$api_name[0]];
## for my $row ( @{ $res->rows } ) { $Country = $row->get_country(); $sql = "insert into table set country = '$Country'... etc ##
## $[$var_name[0]] = $row->$[$api_name[0]];