Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Replacing with comma

by muba (Priest)
on Dec 27, 2012 at 06:57 UTC ( #1010457=note: print w/ replies, xml ) Need Help??


in reply to Replacing with comma

use strict; use warnings; use 5.010; my $foo = "1,2,3"; substr($foo, rindex($foo,","), 1, "|"); say $foo; # 1,2|3 $foo = "1|2|3"; substr($foo, rindex($foo,"|"), 1, ","); say $foo; # 1|2,3


Comment on Re: Replacing with comma
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-07-13 17:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (251 votes), past polls