Re: tr question (probably wrong list to ask, but ...)
[email protected] (Andy Holyer)
| Newsgroups | perl.macosx |
|---|---|
| Message-ID | <[email protected]> |
On 1 Dec 2007, at 00:33, Joel Rees wrote: > This is probably the wrong list for this question, but is anyone > willing to give me a clue why > > $line =~ tr/+/ /; > > would clip out the lead bytes of a shift-JIS string in a cgi script? > That's a badly-formed regular expression. "+" means "one or more of what was just expressed", but you haven't expressed anything so far, so god knows what it will match. I think you meant to say ".+", but that will just delete the whole string in this context. What did you want to do?