title: How can I parse user-agent strings in Perl?
body: <p>I need to parse the user-agents in HTTP-headers from a text file so as to determine the browser, the version, the OS and possibly the device. so few examples of those lines are:</p>
  
  <pre><code>User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Update a; AOL 6.0; Windows 98)
  
  User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 2.0.0 Beta 1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
  
  User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; de-de) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
  
  User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.01  [en]
  </code></pre>
  
  <p>Due to the sheer variety of these strings I figured it would be a better idea to utilize a proven and dependable parser that someone has made available. I did find a few in PHP or java but don't seem to find one for Perl. </p>
  
  <p>Can someone tell me about any such module?</p>