in reply to $^O empty in windows powershell
interesting finding, I tried it and.. more doubts coming out
PS C:\Users\me> Get-Host | Select-Object Version Version ------- 5.1.19041.1682 PS C:\Users\me> C:\EX_D\ulisseDUE\perl5.24.64bit\perl\bin\perl.exe -e +"print $^O;" PS C:\Users\me> + # no output as you noticed PS C:\Users\me> C:\EX_D\ulisseDUE\perl5.24.64bit\perl\bin\perl.exe -e +'print $^O;' MSWin32 + # ok with single quotes.. meh
But what happens if I cast portableshell.bat coming within my portable strawberry perl?
PS C:\Users\me> C:\EX_D\ulisseDUE\perl5.24.64bit\portableshell.bat ---------------------------------------------- Welcome to Strawberry Perl Portable Edition! * URL - http://www.strawberryperl.com/ * see README.TXT for more info ---------------------------------------------- Perl executable: C:\EX_D\ulisseDUE\perl5.24.64bit\perl\bin\perl.exe Perl version : 5.24.2 / MSWin32-x64-multi-thread C:\Users\me>perl -e "print $^O;" MSWin32 # + good 'ol expected behaviour C:\Users\me> C:\Users\me> C:\Users\me>perl -e 'print $^O;' Can't find string terminator "'" anywhere before EOF at -e line 1. # + no more single quote allowed
More: the powershell console is no more a powershell console! Get-Host gives me command not found
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: $^O empty in windows powershell -- portableshell.bat ?
by LanX (Saint) on Nov 22, 2022 at 09:20 UTC | |
|
Re^2: $^O empty in windows powershell -- portableshell.bat ?
by WithABeard (Beadle) on Nov 22, 2022 at 14:31 UTC |