in reply to Pipe and extract

When you assign the return result of a backtick command to an array, each line of output (not each word) gets put in a separate array element. So 0 users, load average: 2.27, 1.95, 1.81 is stored in $arr[0].

So to get "load average: 2.27" you need to parse the string stored in $arr[0] using a regular expression. See perlretut for more info on regular expressions.

Best, beth

Update: various clarifications

P.S. BTW - you did a nice job formatting your code this time!