in reply to Re: Help with converting Python script to Perl for CSV sort
in thread Help with converting Python script to Perl for CSV sort

Thank you for pointing out my mistype in CSV. I have started reading about the Text::CSV
  • Comment on Re^2: Help with converting Python script to Perl for CSV sort

Replies are listed 'Best First'.
Re^3: Help with converting Python script to Perl for CSV sort
by Anonymous Monk on Jan 31, 2017 at 18:34 UTC
    Python sucks
    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;