6 # Breaks lines read from <STDIN> into groups using blank lines as
7 # group separators, then sorts lines within the groups for
13 my $u = '[0-9a-fA-F]';
14 my $uuid_re = "${u}{8}-${u}{4}-${u}{4}-${u}{4}-${u}{12}";
15 if ($a =~ /^$uuid_re/) {
16 if ($b =~ /^$uuid_re/) {
17 return substr($a, 36) cmp substr($b, 36);
21 } elsif ($b =~ /^$uuid_re/) {
30 print "$_\n" foreach sort { compare_lines($a, $b) } @group;
42 $group[$#group] .= "\n" . $_;
49 output_group(@group) if @group;