title: Perl: Regex for reading a log statement
body: <p>I have logs coming in the following way:</p>
  
  <pre><code>2013-07-10 17:27:08 +0900 app.log.error.traffic: {"app.log_count":10,"app.log_bytes":9960,"app.log_count_rate":0.5,"app.log_bytes_rate":166.0}
  </code></pre>
  
  <p>The "app.log.error.traffic" part will not change but the dates and other numbers change all the time. In other words, "2013-07-10" changes everyday, "08 +0900" can also change, "app.log.error.traffic:" doesn't, and ""app.log_count"" also doesn't change.</p>
  
  <p>I want to make a perl script that raises a warning if the number next to "app.log_count": goes beyond a threshold level.</p>
  
  <p>I made the following:</p>
  
  <pre><code> #!/usr/bin/env perl         
   use strict;
   use warnings; 
   use utf8;
  
   my $file_location = "/var/log/app.log" ; 
   my $threshold = 3;        
  
   open my $infile, "&lt;", $file_location or die("$!: $file_location");
      while (&lt;$infile&gt;) {
        if (/ REGEX /) {
            if ($_ &gt;= $threshold) {
            # warning
            } else {
            # not warning;
            }
        }
    }    
  
  close $infile;
  </code></pre>
  
  <p>But as you see, the most important part is missing. What shall I put in REGEX ?</p>