in reply to from txt file to array
You can also assign an undef value to $/ and assigning directly <DATA> to an array. Infact the diamond operator in list context will fill your array.
L*