Skip to content

Commit b5eb85b

Browse files
author
H.Merijn Brand - Tux
committed
test files for perlito
1 parent 6a4ed5e commit b5eb85b

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

csv-pi-easy-pp.pl

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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";

csv-test-pp-pi.pl

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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";

pj-epp.pl

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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";

0 commit comments

Comments
 (0)