in reply to Annoying array.

Take a look at the contents of the file and you'll see that you are saving all the array elements on one line, so when you retrieve it everything is in $raw_data[0]. To save them to individual lines, change print O "@boxed"; to print O join("\n",@boxed),"\n";


We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re: Annoying array.
by Abigail-II (Bishop) on Apr 25, 2003 at 01:04 UTC
    Well, if you do that, you should chomp after reading in the data, and just pray your original data does not contain a newline.

    The OP wants to serialize data. There are several modules doing that: Serialize, Data::Dumper and YAML.

    Abigail