formats are a lot like (non-anonymous) subs. They have to have real names. If you need to give one an arbitrary name, you can either use $x = "foo"; eval "format $x=\n...\n.\n;" or (5.8+ only) *foo = *bar{FORMAT}; (where bar is some actual format name).