factor: prefer signed types
[coreutils.git] / thanks-gen
blobf1c11b3a56f61b425affd674de53dd09dc567d6e
1 #!/usr/bin/perl -nl
2 # Use Perl's multi-byte alignment code, via sprintf, while
3 # performing a rudimentary check for duplicate names and
4 # removing duplicate name,email pairs.
5 use Encode;
7 BEGIN { my (%seen, %name) }
9 chomp;
10 my ($name, $email) = split '\0', decode ('UTF-8', $_);
12 $seen{$name}++
13 and warn "$0: THANKS.in: duplicate name: $name\n";
15 print encode ('UTF-8', sprintf ('%-36s', $name)), $email
16 unless $seen{"$name\0$email"}++;