It is essentially impossible for reasons listed at
On Parsing Perl. However tools like B::Deparse are able
to do a "95%" job of parsing Perl, and you might be
able to build a useful tool on top of that.
Also Perl 6 is supposed to have a saner syntax when it
comes...
Comment on Re (tilly) 1: Idea for Perl Learning Tool
The reasons in that thread are talking about having something other than perl itself parse Perl scripts. B::Deparse doesn't parse Perl, it dumps the results of what perl itself parsed.
The only reason that B::Deparse is missing 5% (or less) is because the module is still young. Some of the bigger missing pieces were just put in place (from what I read) so I suspect that the latest version (not generally available) can successfully "deparse" quite a few working scripts such that the results are functionally identical.