On Dec 12, 2007 5:42 AM,  <[EMAIL PROTECTED]> wrote:
> All,
>
> Thanks for your assistance in helping me with my issues.
>
> The script posted by Rob on the 7th works fantastic.
>
> However I've discovered that we have a lot of systems out there
> running a previous version of perl, so much so that I am getting
> errors within the util.pm.
>
> "Array found where operator expected at ......"
>
> Is there another way to calculate the average CPU from a single column
> which will work in a previous version of perl?
snip

The sum function is just a convieniece function (which is why it is
part of List::Util and not imported by default).  You can get the same
effect like this

my $sum = 0;
$sum += $_ for @cpu;
print $sum / @cpu;

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to