The code I showed is extremely simple because your input file
example is extremely simple. The code I presented will read in a file and will ignore all lines which begin with the string "Number1" because of the
next statement. For all other lines which do not begin with "Number1",
the numbers will be stored in an array. The script will generate warnings if there are blank lines (because of the
print).
Your actual file probably has a more complicated structure than your example file, but I can not predict its structure without more information from you.