Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: recursive call of current script

by BillKSmith (Monsignor)
on Jun 21, 2022 at 19:42 UTC ( [id://11144918]=note: print w/replies, xml ) Need Help??


in reply to recursive call of current script

This may not be the 'cleanest' solution, but it requires very little change to existing code. (Assumes that both regexes cannot match the same $sFunction. But I think that is implied by 'switch'.)
for ( $sFunction ) { (/test1/ || /test2/) && do { # .... }; /test2/ && do { # .... }; }

Sorry, Same as LanX's first solution. Comments apply.

Bill

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-16 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found