system("cat /proc/loadavg") does in fact print to stdout, but that doesn't mean you read its output from stdin. Instead of your cat+while loop+split combo, you want: @loads = split /\s+/, scalar `cat /proc/loadavg` ;
You're using $loads[1] to represent the first element of the array. I think you want $loads[0] instead.