The above didn't work for me. $\ is undefined by default so the newline doesn't print and $= is 60 by default so the tests fail. This is the best fix I could come up with, unfortunately with one extra character:
@ARGV='ctriangle.txt';sub n{print " "x(40-$r/2)."$x\n"};$/=$w;$_=<>; ($r=length($x.=" $_"))>$/and $/=$r,n,$x=''for split;n;
In reply to Re: Re: Triangle Golf
by koolade
in thread Triangle Golf
by nashdj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |