Adwords use a redirect url, which in most cases don't show up as the referer string. So unless you have a query string or a special url for the download page, you won't exactly know whether the user was refered from Adwords. In any case, you will have to track the hits using the Perl script, not anything else.