in reply to C/C++ function parsing

The regex  /([:\w]+)\((.*\))/ matches against  $_ the default scalar. So, what's in $_ ? If it's just a single line from the source file, it will be tricky to parse a multi-line declaration. If it's the entire file (the 'slurped' file), remember that the  . (dot) regex operator matches everything except a newline unless the regex is used with the  /s "dot matches all" regex modifier. See Modifiers in perlre.