in reply to Line trimming regex doesn't work as expected
Well.. as my predecessors have stated do we need more information to say anything that would help. Are your arguments (stored in @_) ok, do you just need /g at the end of your s///, as ikegami already mentioned is "+" in this case not a regular char as you would expect. Just from aspects such as style and efficiency you could do things in case switch or in a more elaborate regex or something more pleasant to the perlish eye.