Text::CSV::UniqueColumns - Perl extension for finding columns with unique values in a CSV
use Text::CSV::UniqueColumns; --Create an object of the module $Obj = new UniqueColumns('check.csv'); --To get list of columns $list = $Obj->getColumnList(); --To check if column 'col1' has unique values. $Int = $Obj->checkUniq('col1'); --To get a list of columns(comma seperated) having unique values. #Returns 1 if unique, 0 if not $Uniq = $Obj->getUniqCols();
find columns with unique values of a CSV file.
Functions and their usage --
getColumnList - list all columns name in a csv checkUniq - Check if one('Col1') or more combination of column('Col1,Col2,Col3') values are unique getUniqCols - give list of unique columns in an CSV.
**** Module works on UNIX boxes only ****
Tushar, <tushar@cpan.org<gt>
Copyright (C) 2010 by Tushar Murudkar
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Text::CSV::UniqueColumns, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::CSV::UniqueColumns
CPAN shell
perl -MCPAN -e shell install Text::CSV::UniqueColumns
For more information on module installation, please visit the detailed CPAN module installation guide.