in reply to Spliting a log file into chunks and saving it into an array
Your $data contained the first line of your logfile because you used the diamond operator in a scalar environment. So only the first line was read into your variable. my @array = <LST>; would read every line into a separate array segment. Just to make clear why you had only one line of content. For the solution of your problem you got already some advice from my predeccessors.