This being perl there are lots of ways you could do it. It's going to depend on exactly your data structure and personal preference.
You could use Data::Dump, so :-
use Data::Dump qw(dump); $str = dump(@list); .... @copy_of_list = eval $str;
But, I prefer to use JSON as the output is human readable, and I can easily edit it.
In reply to Re: Saving a hash/array to a file
by RichardK
in thread Saving a hash/array to a file
by davehorsfall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |