Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: -f not identifying .txt files

by roboticus (Chancellor)
on Sep 24, 2010 at 10:41 UTC ( [id://861776]=note: print w/replies, xml ) Need Help??


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

rucha:

If I had to guess, I'd guess that you have the .pl and .pm files in your current directory, and that d:/perlnew/ex/comp is a test directory, which contains the .pl and .pm files, along with other files. Since there's no directory prefix, the -f function is checking your local directory rather than the directory you've done the readdir from.

If your current directory is actually d:/perlnew/ex/comp when you run your script, then I can't think of a reason that readdir would see the files and -f wouldn't.

...roboticus

Replies are listed 'Best First'.
Re^4: -f not identifying .txt files
by rucha (Initiate) on Sep 24, 2010 at 10:51 UTC

    Hi, the file I'm running is in D:/perlnew/ex
    Its path is D:/perlnew/ex/ex_59a.pl

    The program is extracting(?) filenames from the specified directory (which I passed as the argument), not my current directory..

      rucha:

      As I suspected ... then apply tirwhan's patch, and you should be good to go.

      ...roboticus

      Update: Added link and fixed typo (sorry, tirwhan, I misspelled your name the first time!)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (None)
    As of 2024-04-25 00:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found