Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Replace Character Symbols with White Spaceby davido (Cardinal) |
on Jun 25, 2012 at 16:09 UTC ( [id://978219]=note: print w/replies, xml ) | Need Help?? |
Example:
...the output...
If it's possible that your data has legitimate '+' characters (perhaps escaped, or quoted), then you'll have to use a more elaborate solution. I think that perlintro is required reading for anyone new to Perl, and while the tr/// operator isn't discussed therein, the s/// is. The s/// operator could be used (less efficiently than tr///) like this: s/[+]/ /g. So after reading through perlintro, while you might not have discovered the most efficient way of doing it, you would have gotten a good start toward coming up with a reasonable way of doing it. Dave
In Section
Seekers of Perl Wisdom
|
|