#!/usr/bin/perl # # $iURL = "./html/i.html"; $vURL = "./html/v.html"; $eURL = "./html/e.html"; @user_agent = split(/\//,$ENV{'HTTP_USER_AGENT'}); if ($user_agent[0] eq 'DoCoMo') { $URL = $iURL; } elsif ($user_agent[0] eq 'J-PHONE') { $URL = $vURL; } elsif ($user_agent[0] eq 'UP.Browser') { $URL = $eURL; } else { $URL = $iURL; } print "Content-Type: text/html\n\n"; open(FILE, $URL) or die; while () { print $_; } close(FILE);