Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Regular expression to list all files of type in folder

by Phinix (Acolyte)
on Dec 05, 2012 at 23:55 UTC ( #1007431=note: print w/ replies, xml ) Need Help??


in reply to Re: Regular expression to list all files of type in folder
in thread Regular expression to list all files of type in folder

I skipped the "or die" checks because this is just a quick hack to populate the files I need to include in my PARPacker build list. I agree though this should always be done.

I just checked on your suggestion and you are right, readdir is the one not picking up the similarly named files, though I have absolutely no idea why.

There are no strange files present. No file named "0" or any weird symbols (not that it should matter). It is basically just a folder full of a couple hundred .jpg files with simple names.

I'm using Perl 5.12 so the use in a while loop should be no problem.


Comment on Re^2: Regular expression to list all files of type in folder
Re^3: Regular expression to list all files of type in folder
by LanX (Canon) on Dec 06, 2012 at 00:24 UTC
    what do you get from

    print join "\t", <$dir/*>

    maybe you confused the path?

    'C:/Some/Random/Folder/tmp/bin' ne "C:\\Some\\Random\\Folder\\perl\\bin\\"

    Cheers Rolf

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2014-10-26 00:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (149 votes), past polls