fork download
  1. #!/usr/bin/perl
  2.  
  3.  
  4. $ua = "User-Agent:Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A365 Safari/600.1.4 Name";
  5.  
  6. if ($ua =~ m/.*\(iPhone;.*OS\s(\d.*?\d)\s.*/) {
  7. print "yes";
  8. } else {
  9. print "no";
  10. }
Success #stdin #stdout 0s 17496KB
stdin
Standard input is empty
stdout
yes