in reply to Re^3: Trouble opening and reading file within loop (readdir)
in thread Trouble opening and reading file within loop

Yes I read readdir, I'm assuming "file testing the return values out of a readdir" is my case of why I can't use it? I used glob like you said. No more errors, but I get no output to STDOUT. I placed "print "$file\n" at the end of my first for loop and I see the files are being iterated through, but the guts of the script where I'm trying to find names and object-groups is not showing any output.
  • Comment on Re^4: Trouble opening and reading file within loop (readdir)

Replies are listed 'Best First'.
Re^5: Trouble opening and reading file within loop (readdir)
by Anonymous Monk on Sep 22, 2015 at 01:49 UTC

    Yes I read readdir, I'm assuming "file testing the return values out of a readdir" is my case of why I can't use it?

    Yes, that part, if you're reading from "Foo/" getting a file of "Bar" and then you try to open "Bar" its not going to work as you need to open "Foo/Bar"

    used glob like you said. No more errors, but I get no output to STDOUT. I placed "print "$file\n" at the end of my first for loop and I see the files are being iterated through, but the guts of the script where I'm trying to find names and object-groups is not showing any output.

    This is where subroutines play important part. Consider this version

    If NaNamesConfMod() isn't working, there is no need to try to debug all the other parts, just  NaNamesConfMod( [  "test data" ] ); sub NaNamesConfMod{... }