How do I manipulate this string in perl?
January 9, 2007 7:06 PM
Subscribe
Help! I'm trying to write perl, but I have no idea how to write perl. I need to remove charaters from a string. Can you show me how?
So, I have a string:
$str = "ABC--D----EFGH-----IJK"
I need to get rid of all those hyphens. So that it just looks like this:
"ABCDEFGHIJK"
I know that it must be easy enough, but I haven't been able to figure it out.
posted by TurkishGolds to computers & internet (29 comments total)
6 users marked this as a favorite
posted by TurkishGolds at 7:06 PM on January 9, 2007