in reply to Why " subroutined redefined" warning comes?

Here's an example of why that warning comes:

use strict; use warnings; sub this { print "Hello world!\n"; } sub this { print "Goodbye world!\n"; } this();

If you define a subroutine, and then define it again later, you get a warning. I happen to think that's a good thing. I recommend that if you want to get rid of the warning you get rid of it by not doing what it's warning you about.

But if you really do have a good reason for defining the same subroutine twice, and you just want to squelch it, add this line in the lexical scope where the sub is being redefined:

no warnings qw/redefine/;

Dave