Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Triangle Golf

by jeroenes (Priest)
on Apr 25, 2001 at 02:13 UTC ( #75288=note: print w/ replies, xml ) Need Help??


in reply to Triangle Golf

Works not on words, but 114 char:

@ARGV="ctriangle.txt"; sub n{print$"x(40-$r),@b,$/} @a=map{split}<>;$,=$";while($r++<@a){@b=splice@a,0,$r;n}$r--,n
"We are not alone"(FZ)
Update: Most of this is just an adaption of the other code in this nice thread, including the $". I like xterm's idea of map{split}<> very much I must say. But the '$,' was my own creativity....


Comment on Re: Triangle Golf
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://75288]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2015-07-31 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls