http://www.perlmonks.org?node_id=51224


in reply to Map: The Basics

Pretty good, but make sure you watch your regex.
s/[.,!\?]\B//g
will match anything that has a boundry at the end. You need to escape the . Like this: s/[\.,!\?]\B//g

- p u n k k i d
"Reality is merely an illusion, albeit a very persistent one." -Albert Einstein

Replies are listed 'Best First'.
Re: Re: Map: The Basics
by chipmunk (Parson) on Jan 12, 2001 at 02:24 UTC
    In fact, inside a character class, a period matches a literal period. Although you can escape a period inside a character class if you want to, doing so is not necessary.