Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: HOW CAN WE MAKE A TRIANGLE LIKE THIS IN PERL

by roboticus (Canon)
on Mar 26, 2013 at 11:00 UTC ( #1025499=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ cat t.pl
    #!/usr/bin/perl
    ...
        }
        print "\n";
    }
    
  2. or download this
    print "A bit more perlish: convert C-style for loops\n"
    .     "into perl style for loops\n";
    ...
        }
        print "\n";
    }
    
  3. or download this
    print "Yet more perlishiosness: use the for statement modifier\n";
    for my $i (reverse 1 .. $n) {
        print "*" for 0 .. $i;;
        print "\n";
    }
    
  4. or download this
    print "Not enough perlbell: use 'x' operator for inner loop\n";
    for my $i (reverse 1 .. $n) {
        print "*" x $i, "\n";
    }
    
  5. or download this
    print "Jumping the shark: adding some per(i)lousness\n";
    print map { "*" x $_, "\n" } reverse 1 .. $n;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2014-07-25 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (169 votes), past polls