Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Replacing with comma

by muba (Priest)
on Dec 27, 2012 at 06:57 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found