in reply to Storing multi-line form data in a flat file?
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)
|
|---|