Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Problem changing only first occurence of pattern in file

by nimdokk (Vicar)
on Oct 17, 2006 at 13:27 UTC ( #578761=note: print w/replies, xml ) Need Help??


in reply to Problem changing only first occurence of pattern in file

I could be wrong, but what I think you need to do is break out of the loops with a last statement. What I'd try would be to name the code blocks (i.e. FIRST and SECOND) then after your split, do last FIRST;. I think that will break you out of the loops. This is untested and may not work quite the way I described it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://578761]
help
Chatterbox?
[choroba]: completion?
[LanX]: That's what he usually does when MySQL is mentioned ;-)
[chacham]: the same thing could be achieved with a trigger
[LanX]: choroba yes
chacham shudders at the thought of using a trigger...so evil
LanX will need to find a Perl workaround ... :-|
LanX leaving his cave to enjoy sun! *\o/*

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2017-03-30 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (360 votes). Check out past polls.