in reply to Confusion with Unzip and GREP
... my @fileName = grep(/index/i, readdir D); ...... The grep function. It was getting the file name until yesterday. Now it returns '0' or '1' according to the presence of the index txt file
Then your code does not matches that would produce the values that you are complaining about.
if(index(@fileName, "txt") == -1) { ... }
index function takes two string scalars (& optionally position), not an array & a string.
|
|---|