Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Printing a 2D array into constant-sized columns

by Happy-the-monk (Abbot)
on Apr 01, 2014 at 11:24 UTC ( #1080535=note: print w/ replies, xml ) Need Help??


in reply to [Solved] Printing a 2D array into constant-sized columns

There are builtins like sprintf and printf .

Do they not bring the solution to your task?

If they don't, the keywords to look for on CPAN would be "Format" or "Formatter", I think. Or did I misunderstand your task?

Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)

  • Comment on Re: Printing a 2D array into constant-sized columns

Replies are listed 'Best First'.
Re^2: Printing a 2D array into constant-sized columns
by mascip (Pilgrim) on Apr 01, 2014 at 11:53 UTC

    Thank a lot! Using the keyword "format" I found Text::Column which does exactly what I need.

    I didn't know that printf could deal with arrays, that's good to know! I will learn how to use these at some point, but it feels like learning a new language, so I keep on delaying.

    Problem solved :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2016-06-29 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (378 votes). Check out past polls.