Thanks for your suggestion.
I just put the glob function in there to just give you guys an idea of what was going on. But you are right, it wasn't clear.
My main goal is to work with .txt files so I can parse them for proper records. These files are located on a different server and I need to access them from my server. Is there an easier way to use some sort of Perl command or something really easy so I can look into these files and validate them for proper data?