in reply to Annoying array.

You are printing the array on one line in the file with all the elements concatenated together. When you slurp the file back into the array, each line is put in an element of the array. Since there is only one line, only $raw_data[0] exists. If you print that you'll see what I mean.

When you save to the file, print a newline after each array element (hint, use the join function). When you slurp it back in, the array will be the same, except now each element has a newline appended to it. To get rid of this, read up on chomp.

Hope this helps.