Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Strange behaviour when using glob in if condition

by haukex (Archbishop)
on Apr 11, 2017 at 13:31 UTC ( [id://1187642]=note: print w/replies, xml ) Need Help??


in reply to Strange behaviour when using glob in if condition

# do nothing if the directory is not empty return if glob("$directory/*");

glob skips filenames beginning with a dot, try return if glob("$directory/{*,.*}");

Update: Actually, upon re-reading the question I think I misunderstood what you are trying to do. Update 2: Yep, see my other reply for the solution.

Log In?
Username:
Password:

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

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

    No recent polls found