# Does a bit more than stripping, but in an inconsequential fashion. $string =~ s/^L|-L|L-|L$/-/g;