perl newbie

what is the difference in regexes using symbols like

^NAME$|^SELF$

and

\bNAME\b
\bSELF\b

^ = beginning of string anchor
$ = end of string anchor
\b = word boundary anchor

if NAME or SELF is the only thing in the string being searched they will all work the same. But if there is more text/patterns to search for they will not as ^NAME$ and ^SELF$ mean to find that word and only that word but \bNAME\b could be part of a larger string.

perlretut - perldoc.perl.org