in reply to Re^2: Help with converting Python script to Perl for CSV sort
in thread Help with converting Python script to Perl for CSV sort
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;
|
|---|