Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -n
- use feature qw(say);
- use English;
- BEGIN {
- my %h;
- }
- if (/(\w\w_map) (\d)/) {
- $map_action = $1;
- $num = $2;
- $h{$key}->{$map_action} = $num;
- }
- else {
- chomp;
- $key = $_;
- $h{$key} = {};
- }
- END {
- for $m (keys(%h)) {
- print "${m}:" . $RS;
- for $n (keys(%{$h{$m}})) {
- print "\t${n} " . $h{$m}->{$n} . $RS;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement