in reply to Extract data from txt file

You could use String::Range::Expand to accomplish this.

                "From there to here, from here to there, funny things are everywhere." -- Dr. Seuss