in reply to strange subs

That's a subroutine prototype. The '$$' indicates that it accepts exactly two arguments, both of which will be evaluated in a scalar context. See perldoc perlsub.