Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Using glob in file test gives "Use of uninitialized value in -e" warning.

by toolic (Bishop)
on Dec 06, 2017 at 21:29 UTC ( #1205054=note: print w/replies, xml ) Need Help??


in reply to [SOLVED]: Using glob in file test gives "Use of uninitialized value in -e" warning.

When I enable warnings on the command line, I get warnings :)
perl -wle 'print -e glob "/abc/def/ghi/test*"' Use of uninitialized value in -e at -e line 1. Use of uninitialized value in print at -e line 1.

Here is one way to do what you want:

if (glob '/abc/def/ghi/test*') { # sudo }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2022-01-22 18:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?