strchr locates the first occurance of the second
argument (a character) in its first argument (a string). It's
returned as a pointer. So, if term = '[' it returns
a pointer to the [ in "([{< )]}> )]}>".
5 characters later in the string, you find the closing delimiter.
The sequence )]}> is repeated because they are valid
opening delimiters as well.
Here's a followup question: why does the string have spaces in it?
Whitespace is no longer a valid delimiter (older Perls allowed it), and there are already measures taken to advance past the whitespace. In addition, " " is not a special case character like the brackets are. Therefore, I'll hazard a guess and say they're in there for readability. And because 5 is such a better offset than 4.
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perlhacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;