Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re(4):Short and Sweet Browser Detection

by KM (Priest)
on Jun 07, 2002 at 19:21 UTC ( #172630=note: print w/replies, xml ) Need Help??


in reply to Re(4):Short and Sweet Browser Detection
in thread Short and Sweet Browser Detection

And that's why we have regular expression, and modules which do these things. Get what you need from the USER_AGENT string and match in your keys. Instead of trying to nay-say suggestions, why don't think think of the whole picture of what is available to be done. So, this guy should keep looping through all the user agents? That's absurd.
(my $user_agent = $ENV{USER_AGENT}) =~ s!<whatever>!!; if (exists $user_agents->{$user_agent}) { # foo } else { # bar }
When you are trying to think outside the box, remember to look at the box.

Cheers,
KM

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://172630]
help
Chatterbox?
[ww]: ++ all (phony labels re "gaming"
[1nickt]: ambrus perhaps you know where the keys are?
[ww]: OTOH, -- for ads suggesting that being good at games is somehow eq "greatness"
[ambrus]: 1nickg: obviously the gamers don't know. but anyway, I need the whole room backlit, because watching a monitor in a dark room (like many people do) is tiring for my eyes, even more so than doing it in a lit room.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (18)
As of 2017-03-27 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.