filename=$(basename "$1")
extension="${filename##*.}"
filename="${filename%.*}"
IFS="_" read -r -a array << "$filename"
nFields=0
for element in "${array[@]}"
Unfortunately, I don't have a clue of what you want to achieve, and neither is a line 9 around in your code snippet nor a single "<" sign.
A guess would be that it doesn't like that "<<" which, in recent shells, is a "here document" introducer, and you didn't follow the syntax therefor.
Please explain what you want to do, an give the full code so error messages will become more meaningful, helping us to help you.