Michael Bochkaryov > NetSDS-Util-1.044 > NetSDS::Util::FileImport

Download:
NetSDS-Util-1.044.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.044   Source   Latest Release: NetSDS-Util-1.045

NAME ^

NetSDS::Util::FileImport - import table structure from file

SYNOPSIS ^

DESCRIPTION ^

CLASS API ^

import_table() - import table data from file

takes $content of a file, $pre_parse (true or false it means: return all table or only 5 first rows

params it could be patterns => { qr#name#i => { qr#last#i => 'last_name', qr#first#i => 'first_name' } } separator => could be ,;\t: fields => [ email last_name ] substitute => { E-mail => email, Last Name => last_name, .. }

Depends of a params parse would be different

Returns a structure like this [ { last_name => undef, first_name => yana, ... }, { last_name => kornienko, first_name => test, ... } .. ]

syntax highlighting: