use strict; use warnings; use Data::Dumper; use Spreadsheet::Read; use Text::CSV; my $book = ReadData("test.csv"); my @rows = sort { $a->[1] cmp $b->[1] } Spreadsheet::Read::rows($book- +>[1]); open my $fh, ">pl.csv"; my $csv = Text::CSV->new; $csv->eol("\r\n"); $csv->print($fh, $_) for @rows; close $fh;
In reply to Re^3: Help with converting Python script to Perl for CSV sort
by Anonymous Monk
in thread Help with converting Python script to Perl for CSV sort
by jasonwolf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |