Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Recursive substitution

by JadeNB (Chaplain)
on Nov 10, 2009 at 04:32 UTC ( #806120=note: print w/replies, xml ) Need Help??


in reply to Re: Recursive substitution
in thread Recursive substitution

Thanks very much. I realised shortly after posting that I hadn't explained why I didn't want the most natural answer (current explanation: because I don't, that's why), but didn't update my post in time.

By the way, I think that s/$pat/$sub/ is (effectively) a no-op unless m/$pat/, so I think that it's redundant to do a separate m/$pat/ check.

Replies are listed 'Best First'.
Re^3: Recursive substitution
by bobf (Monsignor) on Nov 10, 2009 at 04:44 UTC

    it's redundant to do a separate m/$pat/ check
    You are absolutely correct, of course. I started playing with patterns that would have required the extra check (because the ones used in s/// and m// were different), but I failed to remove the extra code after changing my approach. I added a note to my original reply but left the crufty code to avoid confusing future readers of this thread.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://806120]
help
Chatterbox?
[Lady_Aleena]: Taking the printing functionality out of a module is hard at times. The one I'm currently working on has conditionals and loops for the data to be printed.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-05-29 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?