Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Example using CGI::Application::Plugin::Output::XSV

by Tux (Canon)
on May 09, 2020 at 19:20 UTC ( [id://11116617]=note: print w/replies, xml ) Need Help??


in reply to Re: Example using CGI::Application::Plugin::Output::XSV
in thread Example using CGI::Application::Plugin::Output::XSV

You don't need the map. AOH is supported:

#!/usr/bin/perl use warnings; use strict; use Text::CSV_XS qw( csv ); my @header = qw( first_name last_name phone ); csv (in => [{ first_name => "Jane", last_name => "Rizzoli", phone => "555-1212" }, { first_name => "Maura", last_name => "Isles", phone => "555-1515" }, ], headers => \@header, );

Or if you have the hash list already.

my @header = qw( first_name last_name phone ); my @aoh = ( { first_name => "Jane", last_name => "Rizzoli", phone => "555-1212" }, { first_name => "Maura", last_name => "Isles", phone => "555-1515" }, ); csv (in => \@aoh, headers => \@header);

Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found