- or download this
- For every array element,
- Extract the numeric component of the element.
...
- Print whatever
- Else
- Print whatever
- or download this
for my $id (@array_code) {
my ($num) = $id =~ /(\d+)/ or next;
...
my $code = $code_numbers{$num} || 'IN';
print("$id $code\n");
}
- or download this
for my $id (@array_code) {
my ($num) = $id =~ /(\d+)/ or next;
...
$code = 'IN' if !length($code);
print("$id $code\n");
}