Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: $^O empty in windows powershell

by LanX (Saint)
on Nov 22, 2022 at 14:48 UTC ( [id://11148304]=note: print w/replies, xml ) Need Help??


in reply to Re^2: $^O empty in windows powershell
in thread $^O empty in windows powershell

my guess is that doublequotes are stripped from the input

PS C:\Windows\system32> perl -E'say @ARGV' 'say "bla"' say bla PS C:\Windows\system32> perl -E'say @ARGV' 'say qq(bla)' say qq(bla) PS C:\Windows\system32> echo 'say "bla"' say "bla" PS C:\Windows\system32> echo 'print "bla"' |perl bla PS C:\Windows\system32> echo 'print "bla"' |perl -E'say <>' print "bla" PS C:\Windows\system32>

this could be an artifact of Perl trying to repair input from CMD ... (?)

(I think eyepops will soon come up with an older discussion about the Perl trying to cleverly fix CMD idiosyncrasies ;)

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: $^O empty in windows powershell
by LanX (Saint) on Nov 22, 2022 at 20:43 UTC
        > > I think eyepops will soon come up with an older discussion about the Perl trying to cleverly fix CMD idiosyncrasies

        > and have no desire to become an expert in fixing CMD

        sorry, I meant you will list some older threads on the topic (which you did, thanks++ :) not you personally trying to fix (what is unfixable).

        > generally, I try to avoid the shell as much as possible and do everything in Perl. :

        best compromise would be a consistent Perl shell running on all platforms! :)

        > I think you may be waiting for ikegami, who seems to be our Windows shell master.

        Well, yeah. He might know if and how PS differs.

        Cheers Rolf
        (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
        Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found