Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^7: Globbing for file in an unkown directory path only works first time in foreach loop?

by poj (Abbot)
on Jan 29, 2016 at 20:54 UTC ( [id://1154035]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Globbing for file in an unkown directory path only works first time in foreach loop?
in thread Globbing for file in an unkown directory path only works first time in foreach loop?

In that case try adding (). I think your problem is that glob in a scalar context, makes it act as an iterator:

my ($info_desired_filepath) = glob('/home/myfiles/day_of +_year/'.$day_of_year.'/*/desired_file.txt');
poj
  • Comment on Re^7: Globbing for file in an unkown directory path only works first time in foreach loop?
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-25 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found