tracks/perl5/exercises/phone-number/.meta/solutions/PhoneNumber.pm in trackler-2.2.1.131 vs tracks/perl5/exercises/phone-number/.meta/solutions/PhoneNumber.pm in trackler-2.2.1.132
- old
+ new
@@ -1,7 +1,9 @@
-package PhoneNumber 3;
+package PhoneNumber 4;
use strict;
use warnings;
+use Exporter 'import';
+our @EXPORT_OK = qw(clean_number);
sub clean_number {
my ($number) = @_;
$number =~ s/\D//g;
return $number =~ /^ 1? ( (?: [2-9] \d{2} ){2} \d{4} ) $/x ? $1 : undef;