I need to be able to count the output of the program i have below, the output basically supposed to look like
website-name.com - Breaking news, opinion, politics, entertainment, sports and culture.
Length 89008
Lines 1517
I have tried to create it but, it dosent seem to be working, so a little help would be greatly appreciated
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.
#!/usr/bin/perl
use strict;
use warnings;
require LWP::UserAgent;
my $size = length(content);
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
my $response = $ua->get('http://kmra.org/');
if ($response->is_success) {
print $response-> title();
print "$size\n";
}
else {
die $response->status_line;
}