Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 cooling their heels in the Monastery: (7)
As of 2015-07-29 07:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls