Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: what would you like to see in perl5.12?

by BrowserUk (Pope)
on Jan 12, 2009 at 07:21 UTC ( #735628=note: print w/ replies, xml ) Need Help??


in reply to what would you like to see in perl5.12?

On the basis of replace text with function ? and similar, a version of s///(g) that takes a code ref as the second half of the construct (somehow) and calls the subroutine with @_ aliased to the current captures:

sub transform ( $_[ 0 ] = 'tripped'; } ... $text =~ s[cow\s+(jumps)\s+over][\&transform]rg; ## /r for 'ref'?

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: what would you like to see in perl5.12?
Select or Download Code
Re^2: what would you like to see in perl5.12?
by ysth (Canon) on Jan 12, 2009 at 07:25 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2015-07-03 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls