in reply to debugger and warn strangeness

I think you want to phrase your first assignment as a scalar, not a slice. That is, change the @c[0] to $c[0].
$c[0] = "\tmargin=\"1\";\n";
This really shouldn't have any effect one way or the other on the operation, since you never declare the @c array anywhere, but maybe the debugger's getting confused.

It's generally safer to use strict so that you develop the habit of declaring variables and arrays, rather than letting them auto-vivify magically.

The panic happens in the *second* call to xxx, on the second execution of the same warn line. Does this happen without the debugger? Does this happen with other ways of initializing @b? What version of Perl, and what operating system? I'm guessing Linux from your prompt.

--
[ e d @ h a l l e y . c c ]