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}
In reply to RE: Simpler Section Numbers
by tye
in thread Sorting on Section Numbers
by Zoogie
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |