Coming from a C++ background, I religiously use the use strict and use warnings features of Perl:
#!/usr/bin/perl -w
use strict;
us
Seeing ikegami's Answer reminded me that perlcritic can identify undeclared subs, but you need to install the Perl::Critic::StricterSubs policy, which is not part of the core Perl::Critic distribution.
perlcritic -4 mycode.pl
Subroutine "foobar" is neither declared nor explicitly imported at line 10, column 1. This might be a major bug. (Severity: 4)