title: How to count the length of output in perl
body: <p>I need to be able to count the output of the program i have below, the output basically supposed to look like</p>
  
  <pre><code>website-name.com - Breaking news, opinion, politics, entertainment, sports and culture.
  Length 89008
  Lines 1517
  </code></pre>
  
  <p>I have tried to create it but, it dosent seem to be working, so a little help would be greatly appreciated</p>
  
  <p>Just for a little background info, the program i am scripting is using LWP::UserAgent; to get content from websites and display it, so what i want to do is to count the output and get the amount of characters.</p>
  
  <pre><code>#!/usr/bin/perl
  
  use strict;
  use warnings;
  require LWP::UserAgent;
  
  
  
   my $size = length(content);
  
   my $ua = LWP::UserAgent-&gt;new;
   $ua-&gt;timeout(10);
   $ua-&gt;env_proxy;
  
   my $response = $ua-&gt;get('http://kmra.org/');
  
   if ($response-&gt;is_success) {
       print $response-&gt; title();
       print "$size\n";
  
   }
   else {
       die $response-&gt;status_line;
   }
  </code></pre>