$raw_data=; while () { foreach ($raw_data) { #### while () { my @new_data = split /ms/; # do stuff }