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

Re: How to build a better mousetrap (or a variable to hold a column-measuring scale)

by LanX (Archbishop)
on Sep 09, 2019 at 21:09 UTC ( #11105912=note: print w/replies, xml ) Need Help??


in reply to How to build a better mousetrap (or a variable to hold a column-measuring scale)

does this help?
DB<82> p join "+", map { $b =$_ %10; $a = sprintf "----%s--", $b ? " +${b}0-" : "${_}0" } 8..12 ----80---+----90---+----100--+----10---+----20---

could be shorter but I'm tired! ;-)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

  • Comment on Re: How to build a better mousetrap (or a variable to hold a column-measuring scale)
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2020-01-23 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?