Perl Hacks #12 shows how to do this in a general way with YAML and a temporary file. See Use $EDITOR as your UI on the Perl Hacks Table of Contents; the preview shows the code.
In reply to Re: In memory edit of perl data with emacs
by chromatic
in thread In memory edit of perl data with emacs
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |