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

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

by Happy-the-monk (Monsignor)
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
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 studying the Monastery: (7)
As of 2014-11-22 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (123 votes), past polls