Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

RE: Simpler Section Numbers

by tye (Cardinal)
on Jul 28, 2000 at 23:32 UTC ( #24986=note: print w/ replies, xml ) Need Help??


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:

map {s/.../.../ge; $_}
which still hides side-effects inside map or:
map {(my $x= $_)=~s/.../.../ge; $x}
which just, well, isn't slick. :)


Comment on RE: Simpler Section Numbers
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://24986]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2014-10-01 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (38 votes), past polls