line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package School::Code::Compare::Charset::NumSignes; |
2
|
|
|
|
|
|
|
# ABSTRACT: trim english letters |
3
|
|
|
|
|
|
|
$School::Code::Compare::Charset::NumSignes::VERSION = '0.102'; # TRIAL |
4
|
5
|
|
|
5
|
|
281281
|
use strict; |
|
5
|
|
|
|
|
18
|
|
|
5
|
|
|
|
|
248
|
|
5
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
809
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
2
|
|
|
2
|
0
|
279
|
my $class = shift; |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
|
|
4
|
my $self = { |
11
|
|
|
|
|
|
|
}; |
12
|
2
|
|
|
|
|
5
|
bless $self, $class; |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
|
|
7
|
return $self; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub filter { |
18
|
2
|
|
|
2
|
0
|
8
|
my $self = shift; |
19
|
2
|
|
|
|
|
3
|
my $lines_ref = shift; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
3
|
my @numsignes; |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
|
|
4
|
foreach my $row (@{$lines_ref}) { |
|
2
|
|
|
|
|
4
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
#$row =~ s/[:alpha:]/a/g; |
26
|
9
|
|
|
|
|
35
|
$row =~ s/[[:alpha:]]+/a/g; |
27
|
9
|
|
|
|
|
21
|
$row =~ s/\d+/0/g; |
28
|
9
|
50
|
|
|
|
20
|
next if ($row eq ''); |
29
|
|
|
|
|
|
|
|
30
|
9
|
|
|
|
|
14
|
push @numsignes, $row; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
7
|
return \@numsignes; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=pod |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=encoding UTF-8 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 NAME |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
School::Code::Compare::Charset::NumSignes - trim english letters |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 VERSION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
version 0.102 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 AUTHOR |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Boris Däppen <bdaeppen.perl@gmail.com> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Boris Däppen. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
61
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |