open a file named DATA.TXT read all lines of this file if the string 'NINE' is found save the whole string for later use -or (not clear in your question)- if the string 'NINE' is found split this string into 8 parts close the file print the result #### use strict; use warnings;