in reply to Grep file before sending through socket
The while() loop there is superfluous. The first readdir() reads off the first entry since it's called in scalar context, then the grep() reads off all the rest in one go since it calls readdir() in array context. The while loop only executes once, and your grep always misses the first file. Since the first file is always "." and you're grepping to get rid of it anyway, the loop doesn't hurt anything, but it isn't doing quite what you intended. :)while (readdir OMSSEND) { @conffiles = grep { !/^\./ } readdir(OMSSEND); }
-Matt
|
|---|