in reply to Why this error message comes?

I assume you are converting your Perl script to an .exe file using PAR.

The way PAR works is that it injects a code reference into @INC, which trips you up when you iterate over it. A solution to eliminating this warning would be to make sure you only process plain scalars in your File::Find subroutine:

foreach my $dir (grep { ! ref } @INC) {

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.