Inspired by a mind-numbingly dull CS lecture (Introduction to OO programming, AKA Java 101) I came up with this little abuse of nested ternary operators.
#!/usr/bin/perl
$/=length($"=int<STDIN>)+1;
for$!(1..$")
{print$_<$"+1-$!?" "x$/:$_<=$"?sprintf"%*d",$/,$"+1-$_:$_<=$"+$!-1?spr
+intf"%*d",$/,abs$"-1-$_:$_==2*$"?"\n":""foreach(1..(2*$"));}
Mostly your garden variety alphabet soup obfuscation, but you gotta start somewhere right?
I've considered adding code to print less whitespace with lower numbers when printing a high number of rows, but decided not as it would make the output less like a pyramid (which is the desired effect after all).
Any thoughts?