Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Help with Creating a Table from array ref I parsed in

by choroba (Cardinal)
on May 12, 2022 at 11:58 UTC ( [id://11143831]=note: print w/replies, xml ) Need Help??


in reply to Help with Creating a Table from array ref I parsed in

Another approach (TIMTOWTDI): use Text::Table.

#! /usr/bin/perl use warnings; use strict; use Text::Table; my $t = 'Text::Table'->new; while (<DATA>) { my @cols = split; $t->add(("") x (3 == @cols), @cols); } print $t;

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-26 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found