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

Re: Replacing a specfied instance of a pattern in a string

by Jasper (Chaplain)
on Jul 15, 2005 at 11:01 UTC ( #475172=note: print w/replies, xml ) Need Help??


in reply to Replacing a specfied instance of a pattern in a string

my $instance = 3; $string = s/fsih/--$instance?$&:'fish'/eg;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://475172]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2017-02-26 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (376 votes). Check out past polls.