![]() |
|
Welcome to the Monastery | |
PerlMonks |
Re: There is more than one way (and mine is not the best)by Belgarion (Chaplain) |
on May 25, 2004 at 21:22 UTC ( [id://356378]=note: print w/replies, xml ) | Need Help?? |
If your code is being run in the same directory as the files you could always do something like this:
This would remove the need for the "qcode" file, since it's only doing what the file system already does---namely, maintain a list of file names. As for the rest of the code: I think you're missing some braces in various places. If you tried to run your code through a good indenting text editor, you would notice that things are not lining up as you would expect. Also, doing a perl -cw ./yourprogram.pl says there are syntax errors with your script. Finally, I'm not sure why you're processing the file twice. I'm assuming there is a good reason, but it's not apparent to me at the moment.
In Section
Seekers of Perl Wisdom
|
|