the $() is a short version of $eval much like $r is short for $rand
$() is also used in the matchtext section of on text or on input events

on *:text:$($me):#: Echo -s $nick said $me }

on *:text:$($+(*,$me,*)):#: Echo -s $nick said $me }

so on