Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Transliterationby cei (Monk) |
on May 03, 2000 at 05:41 UTC ( [id://10022]=perlquestion: print w/replies, xml ) | Need Help?? |
cei has asked for the wisdom of the Perl Monks concerning the following question:
Last night I wrote a little program using the Geo::WeatherNOAA module to get the weather forecast for my region and dump it into MySQL. I was a happy little initiate. But I noticed that the strings that NOAA sends back end with a single equal sign. I use to make my forecast one string. I'd like to strip that = off though. I could chomp it but the way my loop is written, my string actually ends with ' = ', so that isn't ideal. Being a good little monk in training, I thought I'd try transliteration. I know how to change case by saying $email =~ tr/A-Z/a-z/; but how can I transliterate an equal sign into either a space (or delete it entirely)? I tried $fcast =~ tr/=//; and $fcast =~ tr/\=//; with no luck. I'm guessing a 'd' should be in there... maybe $fcast =~ tr/\=//d; but I couldn't seem to get a good result. Any suggestions, oh wise ones?
Back to
Seekers of Perl Wisdom
|
|