import requests


def served_by_perl(url):
    """Return True if url returns 200 and is served by Perl."""
    r = requests.get(url, allow_redirects=False)
    status = (r.status_code == 302)
    perl = ('x-perl-redirect' in r.headers and r.headers['x-perl-redirect'] == 'True')
    return all([status, perl])