He is talking about putting code tags around your listing to make it easier to read.
I don't think readdir does what you think it does.
It opens a directory and gives a list of file names. It does not do subdirectory processing.
If a directory listing looks like
$ ls -r xyz
opendir(INPUTDIR,"xyz"); # I'll assume it always opens
@list = readdir(INPUTDIR)
Will give you the array list with:
Your grep line appears to be looking for "xyz/a", which won't be there.
The result should be an empty list (@customer_files will have nothing in it), and the script then exits.