I want to display my computer's operating system using Perl. I thought the following would do
#!/usr/bin/perl
use strict;
use warnings;
my $os = $^O;
print "$os\n";
But the output I got is
linux
I want the output to be displayed as
Windows XP
How to do this? Please help. Thanks in advance.
Use the uname() function that the POSIX module provides for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With