-2
!#/usr/bin/perl -w  
use strict;  
use warnings;  
use File::Find::Rule;  
my $finder=File::Find::Rule->directory->in($directory);  

Warning is

Can't locate File/Find/Rule.pm in @INC  
(@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./test.pl line 4.  
BEGIN failed--compilation aborted at ./test.pl line 4.
serenesat
  • 4,611
  • 10
  • 37
  • 53
Navaneeth Cp
  • 31
  • 3
  • 9

1 Answers1

2

File::Find::Rule module is not install in your system where you are executing your Perl script. Install that module.

Other things in your code is shebang line start with #! not with !#:

#!/usr/bin/perl

Use use warnings; or -w, not both.

serenesat
  • 4,611
  • 10
  • 37
  • 53
  • How can I install File::Find::Rule module ? – Navaneeth Cp Feb 19 '16 at 10:10
  • There are several question on SO about how to install module. Please search. Read this -> http://perlmaven.com/how-to-install-a-perl-module-from-cpan and this -> http://stackoverflow.com/q/65865/4248931 – serenesat Feb 19 '16 at 11:01