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

Re: ASCII Pattern - Golf

by davido (Cardinal)
on Sep 19, 2003 at 01:02 UTC ( [id://292549]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $!/usr/bin/perl
    @A=map{abs}@ARGV;for($y=9;$y>0;$y--){print$A[1]-$y>$A[0]-$_?$A[1]-$y:(
    +$A[0]-$_)for(1..9);print$/}
    
  2. or download this
    sub a{abs$ARGV[shift]-pop}for($y=9;$y;$y--){print a(1,$y)>a(0,$_)?a 1,
    +$y:a(0,$_)for 1..9;print$/}
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found