Pretty straight forward algorithm, does a simple regex a few times.
#!perl s//-\n/,eval's/./$& $&/g,'x pop;print |
This is where my luck runs out. There should be a man-page perltricks to make these easier :-)
#!perl
$_="-\n";for$,(1..pop){s/./$& $&/g}print
|
I have about 2 hours of perl experience right now =)
#!perl
for($_="-";$ARGV[0]--;){$_.=" "x(length).$_}print$_.$/
|