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

Re^2: How to insert a "/" within a string?

by bimleshsharma (Beadle)
on Feb 21, 2012 at 11:06 UTC ( #955277=note: print w/ replies, xml ) Need Help??


in reply to Re: How to insert a "/" within a string?
in thread How to insert a "/" within a string?

This will also work...

my $string = 'ACOCOB'; $string =~ s/CO/C\/O/g; print "$string\n";


Comment on Re^2: How to insert a "/" within a string?
Download Code
Re^3: How to insert a "/" within a string?
by ikegami (Pope) on Feb 22, 2012 at 00:01 UTC
    Yes, but he intentionally avoided using "/" as a delimiter to avoid "leaning toothpick syndrome".

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2014-07-29 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (225 votes), past polls