|Syntactic Confectionery Delight|
a) There's a recent thread here (I think in meditations, "Perl idioms explained", but I'll look it up for you) that explains what happens with // and //g. In short: you need to use //g in list context, and extract the count from there.
Update: Got it: Perl Idioms Explained - @ary = $str =~ m/(stuff)/g
b) Even if it's another "and"? Use lookahead.
You can use list context again, in which case you'll get a list of list of matches, but flattened.
c) That's just his point of view. Tastes vary. I happen to disagree. But that's just me. :)
d) Dunno. Maybe you should try out one of those template modules. That way you can separate code (script) from design (template). There's a nice list in the intro chapter of the Mason book: chapter 1
There's also a comparative list in this article on <perl.com>: Choosing a Templating System