A few tiny things on top @Brythan @Brythan's excellent review.
my $subls = '[a-z0-9\. ]+';
You don't need to escape \.
within [ ... ]
inside a regex. So this is the same and simpler:
my $subls = '[a-z0-9. ]+';
Instead of this:
$value = q{} if not defined $value;
This is shorter and easier to type:
$value = '' if not defined $value;
else { die "invalid key: $key\n"; }
If you omit the newline \n
,
then die
will append the line number and a newline to the message,
which is useful for debugging.
(Maybe you already knew this and put the newline there on purpose to hide the line number, but maybe not, so I thought this is worth mentioning.)
The parentheses are unnecessary here:
return (join ', ', keys %emails);
A few tiny things on top @Brythan's excellent review.
my $subls = '[a-z0-9\. ]+';
You don't need to escape \.
within [ ... ]
inside a regex. So this is the same and simpler:
my $subls = '[a-z0-9. ]+';
Instead of this:
$value = q{} if not defined $value;
This is shorter and easier to type:
$value = '' if not defined $value;
else { die "invalid key: $key\n"; }
If you omit the newline \n
,
then die
will append the line number and a newline to the message,
which is useful for debugging.
(Maybe you already knew this and put the newline there on purpose to hide the line number, but maybe not, so I thought this is worth mentioning.)
The parentheses are unnecessary here:
return (join ', ', keys %emails);
A few tiny things on top @Brythan's excellent review.
my $subls = '[a-z0-9\. ]+';
You don't need to escape \.
within [ ... ]
inside a regex. So this is the same and simpler:
my $subls = '[a-z0-9. ]+';
Instead of this:
$value = q{} if not defined $value;
This is shorter and easier to type:
$value = '' if not defined $value;
else { die "invalid key: $key\n"; }
If you omit the newline \n
,
then die
will append the line number and a newline to the message,
which is useful for debugging.
(Maybe you already knew this and put the newline there on purpose to hide the line number, but maybe not, so I thought this is worth mentioning.)
The parentheses are unnecessary here:
return (join ', ', keys %emails);
A few tiny things on top @Brythan's excellent review.
my $subls = '[a-z0-9\. ]+';
You don't need to escape \.
within [ ... ]
inside a regex. So this is the same and simpler:
my $subls = '[a-z0-9. ]+';
Instead of this:
$value = q{} if not defined $value;
This is shorter and easier to type:
$value = '' if not defined $value;
else { die "invalid key: $key\n"; }
If you omit the newline \n
,
then die
will append the line number and a newline to the message,
which is useful for debugging.
(Maybe you already knew this and put the newline there on purpose to hide the line number, but maybe not, so I thought this is worth mentioning.)
The parentheses are unnecessary here:
return (join ', ', keys %emails);