in reply to Re: Help choosing the most efficient, dependable condition(al)
in thread Help choosing the most efficient, dependable condition(al)
The preceding is a good way to go, but it you want slightly simpler I've done this before:
if (($ENV{'HTTP_ACCEPT'} || '') =~ /application\/xhtml\+xml/) { print "content-type:application/xhtml+xml; charset=utf-8\n\n"; }else{ print "content-type:text/html; charset=utf-8\n\n"; }
|
|---|