I
infinity12star
Hi people i'm a beginner of Perl language, i'm trying to get a System
Report of any computer, where i can capture the CPU information,
Memory, etc
but i'm having difficulty to capture the right output.
here is my code
open(CPU, "cat /proc/cpuinfo|");
#CPU = <CPU>;
close(CPU);
print $CPU;
with these codes it only captures the very First field of the output
from the CPU info, and if i use
$cpuinfo = system("cat /proc/cpuinfo");
print $cpuinfo;
it will capture all the outputs.
Can anyone tell me what should i do to filter the only field i want
from the output please. thanks guys
Report of any computer, where i can capture the CPU information,
Memory, etc
but i'm having difficulty to capture the right output.
here is my code
open(CPU, "cat /proc/cpuinfo|");
#CPU = <CPU>;
close(CPU);
print $CPU;
with these codes it only captures the very First field of the output
from the CPU info, and if i use
$cpuinfo = system("cat /proc/cpuinfo");
print $cpuinfo;
it will capture all the outputs.
Can anyone tell me what should i do to filter the only field i want
from the output please. thanks guys