- Code: Select all
# cat > sorter.pl
(m#^\s*/# .. m# ^[^\s] | ^\s+[^/] #x) =~ /^\d+$/ and push @s, $_ and next;
print sort @s and undef @s if @s;
print;
<type a ^D here>
# perl -n sorter.pl policy > policy2
# cat > sorter.pl
(m#^\s*/# .. m# ^[^\s] | ^\s+[^/] #x) =~ /^\d+$/ and push @s, $_ and next;
print sort @s and undef @s if @s;
print;
<type a ^D here>
# perl -n sorter.pl policy > policy2