in reply to Short and Sweet Browser Detection
I would suggest making your structure a hash, so you don't have to loop. With a long list (like if you add Lynx, Chimera, iCab, DoCoMo, etc...) the looping is uneeded.
May serve you well. Just make sure the keys are the user agent info you want, and manipulate $ENV{USER_AGENT} to remove any OS info (assuming you don't want that).my $user_agent = {"Mozilla" => {string => "Mozilla", url => "http://mo +zilla.org"}, "Opena" => # etc... };
Cheers,
KM
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Short and Sweet Browser Detection
by jeffenstein (Hermit) on Jun 07, 2002 at 18:55 UTC | |
by KM (Priest) on Jun 07, 2002 at 19:09 UTC | |
by Dog and Pony (Priest) on Jun 07, 2002 at 19:16 UTC | |
by KM (Priest) on Jun 07, 2002 at 19:44 UTC | |
by KM (Priest) on Jun 07, 2002 at 19:21 UTC |
In Section
Cool Uses for Perl