My program follows,
sub is_firefox {
my $agent = '';
$agent = $ENV{"HTTP_USER_AGENT"} || '';
if (length($agent) && $agent =~ m/firefox/si) {
return 1;
}
return 0;
}
I have printed all the keys and values of %ENV using while and each. I have checked this in Debian Linux, and Apache server.