|Just another Perl shrine|
$^O empty in windows powershellby WithABeard (Acolyte)
|on Nov 21, 2022 at 11:44 UTC ( #11148285=perlquestion: print w/replies, xml )||Need Help??|
WithABeard has asked for the wisdom of the Perl Monks concerning the following question:
When I run the following code in command prompt (cmd), I get the "MSWin32", as expectedperl -e "print $^O;"
But when I run the same code in powershell, I get nothing.
The following code works though, outputting the same in both shells:perl -MWin32 -e "print Win32::GetOSName();"
This outputs Win10Build 19043 (64-bit)
Is this a bug?
I'm using StrawberryPerl, perl version: v5.32.1 built for MSWin32-x64-multi-thread
Back to Seekers of Perl Wisdom