#!/usr/bin/perl -wT use strict; use CGI qw(:standard); my $query = new CGI; my $browser = user_agent(); if ($browser =~ /apple|mac|safari/i) #I am a Mac { print $query->redirect('http://henryjamesfeltus.com/apple/iammac.htm +')} else #I am not a Mac { print $query->redirect('http://henryjamesfeltus.com/apple/iaintmac.h +tm')};
Edit by thelenm: added code tags
In reply to Detect Mac Browser by Arbogast
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |