Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Triangle Golf

by nashdj (Friar)
on Apr 24, 2001 at 14:23 UTC ( #75004=CUFP: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    a a a a a a a a a
    a a a a a a a a a
    a a a a a a a a a
    a a a a a a a a
    
  2. or download this
           a
          a a
         a a a
    ...
      a a a a a a
     a a a a a a a
     a a a a a a a
    
  3. or download this
              The
             same
           principle
    ...
      basically splitting
     words only on spaces
         or new lines
    
  4. or download this
    /[ 
    ]+/
    
  5. or download this
    open F,"ctriangle.txt";sub n{print
    " "x(40-$r/2)."$x\n"};for(split/[ 
    ]+/,join'',<F>){$c=$r,n,$x=''if(
    $r=length($x.=" $_"))>$c}n
    
  6. or download this
    open F,"ctriangle.txt";sub n{print
    " "x(40-$r/2)."$x\n"};$/=$w;$_=<F>;
    for(split){$c=$r,n,$x=''if(
    $r=length($x.=" $_"))>$c}n
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2015-07-03 08:39 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 (49 votes), past polls