I would write
assub{$h{$1} = $2 if /(\d+)\n\n(\w+)/}->() foreach <DATA>;
/(\d+)\n+(\w+)/ and $h{$1} = $2 for <DATA>;
which I think is more readible. The modification of the regex makes it a little more robust relative to the formatting of the data. You would also lose data if there are duplicate ">or..." bits and multiline sequences.
In reply to Re^2: sorting headers in a file
by hdb
in thread sorting headers in a file
by utpalmtbi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |