I can't help you on the Cyclomatic Complexity tool thing. But if you want to build you own, and need to parse perl code (and analyze it) then you might want to give PPI a look.
From a quick scan of the Cyclomatic Complexity page you linked to, and from this sentence fragment/description "it measures the number of linearly-independent paths through a program module", it makes me think of Devel::Cover, which uses the "runops" (I think that is the name) routine to gather coverage information and could possibly be used to calculate Cyclomatic Complexity with.