Hi friends,
I am trying to come up with a Perl script to display information about my computer and specifically the CPU and RAM details in a clear detailed way, I understand that only a few CPUs are compatible with this I don't know if mine is compatible, if anyone is aware of how to do it the please I could use some help doing it, thank you.
How to show cpu information using perl
This Perl script determine information about the installed OS, computer name, processor, RAM, Hard Drives, and computer network settings.
Perl WinInfo.pl > output.txt
This will save the output of the script to a file called Perl script.txt.Â
Â
How to show cpu information using perl
The name of the operating system is contained within the "$^O" variable.
print "$^On"
will print "linux" on Linux, "MSWin32" on Windows and "darwin" on Mac OS X.
You can also use the "Config" module:
use Config;
print "$Config{osname}n";
print "$Config{archname}n";
Note that this will display information about the system Perl was built on, rather than the one it is currently running on.