Hi Arijit,
>I am just wondering...what am I doing wrong here. Why isn't "$latest_CPU_load\n" printing the desired value like $top_output[2]....
grep returns an array which in scalar context evaluates to the number of elements in there. (There is one line containing 'load average')
>Any help here?
Yes write the assignment the way you intended it. ;-)
($latest_CPU_load)= grep(/load average/, @top_output);
HTH
George Mavridis
_______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs