Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: -f not identifying .txt files

by tirwhan (Abbot)
on Sep 24, 2010 at 10:48 UTC ( #861778=note: print w/replies, xml ) Need Help??


in reply to Re^2: -f not identifying .txt files
in thread -f not identifying .txt files

Check the working directory in which you are executing the script. I'd wager you have the .pl and Dumper.pm files in there, but not the others. To fix your script change, on line 20 of the code given

        if(-f $_)
to
        if(-f "$p/$_")

All dogma is stupid.

Replies are listed 'Best First'.
Re^4: -f not identifying .txt files
by rucha (Initiate) on Sep 28, 2010 at 04:41 UTC
    Thank you all !

    I prepended the directory path to the filename, and now it's printing all the files along with last modified no. of days ago correctly.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://861778]
help
Chatterbox?
NodeReaper lights some incense and reads Tool and Die

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2017-03-26 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (313 votes). Check out past polls.