File tree 3 files changed +42
-0
lines changed
3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ # !/usr/bin/perl
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use Text::CSV::Easy_PP;
7
+
8
+ my $sum = 0;
9
+ while (my $line = <>) {
10
+ my @row = Text::CSV::Easy_PP::csv_parse ($line );
11
+ $sum += @row ;
12
+ }
13
+ print " $sum \n " ;
Original file line number Diff line number Diff line change
1
+ # !/usr/bin/perl
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use Text::CSV_PP;
7
+
8
+ my @rows ;
9
+ my $csv = Text::CSV_PP-> new ({ binary => 1, auto_diag => 1 } )
10
+ or die " Cannot use CSV: " , Text::CSV-> error_diag ();
11
+
12
+ my $sum = 0;
13
+ while (my $row = $csv -> getline (*ARGV )) {
14
+ $sum += scalar @$row ;
15
+ }
16
+ print " $sum \n " ;
Original file line number Diff line number Diff line change
1
+ # !/usr/bin/perl
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use Text::CSV::Easy_PP;
7
+
8
+ my $sum = 0;
9
+ while (my $line = <>) {
10
+ my @row = Text::CSV::Easy_PP::csv_parse ($line );
11
+ $sum += @row ;
12
+ }
13
+ print " $sum \n " ;
You can’t perform that action at this time.
0 commit comments