I do not know how much you know, but what this does (I hope) is read the output from your open. Then the current line from the reading of the output is checked to see if it is the same as your variable (something...). It will push it onto the array at the end of the stack.