in reply to Storing multi-line form data in a flat file?

One way you do this is pick two special characters. Pick ones that aren't likely to be used often like "\030" and "\031". Now do this:
my %codes = ("\031" => "\030\001", "\031" => "\030\001"); foreach $item (@items) { $item =~s/(\031|\030)/$codes{$1)/ge; print FILE $item."\031"; }

Now the only "\030"s that appear in the file are the record seperators and you do a simple match like that one to restore the occasional encoded values.

--
$you = new YOU;
honk() if $you->love(perl)