Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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
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 wandering the Monastery: (2)
As of 2020-10-24 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (246 votes). Check out past polls.

    Notices?