Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 rifling through the Monastery: (8)
As of 2015-07-03 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (48 votes), past polls