in reply to Simpler Section Numbers
in thread Sorting on Section Numbers
Actually I wrote it as map first and, of course, it didn't work because s// doesn't return the modified string. Breaking the unwritten rule of grep seemed slicker than:
which still hides side-effects inside map or:map {s/.../.../ge; $_}
which just, well, isn't slick. :)map {(my $x= $_)=~s/.../.../ge; $x}
|
---|