in reply to Newline in left-justified string for %s warning

What do you really want to generate? The Use of uninitialized value in sprintf is because you have two %ss in your format string, but only provide one string.

Do you mean something like this:

use warnings; use strict; my @rel = ("test1", "test2", "test3"); print join " &\n ", @rel;

which prints:

test1 & test2 & test3

Perl is Huffman encoded by design.