##
use Modern::Perl;
use URI::Escape qw/uri_escape/;
use HTML::HTML5::Entities qw/encode_entities/;
my @t = qw(name John number 7 status unknown);
my %th = @t; # cast to hash
my $url = 'show_person.cgi?' .
join '&',
map { sprintf '%s=%s', uri_escape($_), uri_escape($th{$_}) }
keys %th;
printf(
'%s',
encode_entities($url),
encode_entities($th{name}),
);