| |||||||||||
| |||||||||||
Finding Internet Explorer version number Posted by enquirer (enquirer), 30 November 2003 Thanks for such information on the web.I actually want to write a perl program which will just display the IE version of the machine on which I will execute this perl program. Posted by admin (Graham Ellis), 30 November 2003 What are you trying to do? IE is a client program (a browser), but Perl usually lives on the server for running CGI scripts. In those, you'll find an environment variable $ENV{HTTP_USER_AGENT} which contains the information you're looking for. Here's an example of the string in the variable:Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC) Which you could tackle with a regular expression such as /MSIE\s+([0-9.]+)/ to get the version number into the variable $1. If you are truely looking for the version(s) or IE that are present on a system on which you are running a Perl program, yes, the registry will contain many settings that might be useful clues; not something I've researched in depth, but if you use the programs that we have around and on our web site / in our courses, they will give you a framework from which you can search and experimentally find what the information you need is. Posted by Custard (Custard), 30 November 2003 or if you're using CGI.pm $query->user_agent(); does the same trick, but using CGI which is generally recommended.This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |