Take the 2-minute tour ×  Is there a module, which can find code
not needed? As an example a script with code not needed to run
the script:  #!/usr/bin/env perl use warnings; use 5.12.0; use
utf8; binmode STDOUT, ':utf8'; use DateTime; use WWW::Mechanize;
sub my_print {     my ( $string, $tab, $color ) = @_;     say
$string;  sub check {     my $string = shift;     return if
length $string > 10;     return $string;  my_print( 'Hello
World' ); share|improve this question add comment  2 Answers  up
vote 4 down vote accepted  Not categorically. Perl is
notoriously difficult to analyze without actually executing, to
the point that compiling a Perl program to be run later actually
requires including a copy of the perl interpreter! As a result
there are very few code analysis tools for Perl. What you can do
is use a profiler, but this is a bit overkill (and as I
mentioned, requires actually executing the program. I like
Devel::NYTProf. This will spit out some HTML files showing how
many times eaqch line or sub was