Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Golf: Seven segment display

by jffry (Hermit)
on Jan 23, 2012 at 23:22 UTC ( [id://949544] : note . print w/replies, xml ) Need Help??


in reply to Golf: Seven segment display

The only problem is that this is not "9"

_ |_| _|

This is:

_ |_| |

Otherwise, the old trick of "59009" upside down doesn't work anymore.

Replies are listed 'Best First'.
Re^2: Golf: Seven segment display
by brx (Pilgrim) on Jan 25, 2012 at 09:41 UTC
    sub w{for$;(1005,924745596,341831021){say map{$;>>$_&1?/../?'|':_:$"}m +ap{$_+20,$_,$_+10}$_[0]=~/./g}} w("59009");
    output:
    _ _ _ _ _ |_ |_|| || ||_| _| ||_||_| |

      /me flips laptop upside down, laughs like Beavis & Butthead.