in reply to (OT) passing string array
Print a file name perline and pipe the result into the next script. The next script then reads a line at a time from STDIN, chomps it, then performs whatever further processing is needed on the file name.