Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Strawberry Perl on Windows 10 file test operators do not work as expected

by choroba (Cardinal)
on Jul 22, 2020 at 21:00 UTC ( [id://11119679]=note: print w/replies, xml ) Need Help??


in reply to Strawberry Perl on Windows 10 file test operators do not work as expected

> -e "C:\Users" resolves to a false value

Are you sure you used exactly this syntax? No wonder the file doesn't exist:

perl -wE "say qq<C:\Users>" C:SERS

\U in double quotes uppercases the following letters up to \E or end of the string.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Strawberry Perl on Windows 10 file test operators do not work as expected
by fireblood (Scribe) on Jul 22, 2020 at 21:24 UTC
    Hi choroba, yes, you are correct, and in my actual code I did include the backslash escape character before the backslash path separator character (i.e. a double backslash) but did not have it in the code example that I typed in. I have updated my post to use single quotes rather than double quotes in that particular spot. Thanks for spotting that.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-19 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found