Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

When I run a script with
use tk;
and the -w switch I get a whole bunch of errors in the form
Subroutine Tk::<some name> redefined at Tk.pm line 57 
I checked the source and line 57 is a bootstrap call. Anybody else ever encounter this problem?

Replies are listed 'Best First'.
Re: Tk and -w
by Anonymous Monk on Mar 21, 2000 at 12:06 UTC
    simple answer. wrong:
    use tk;
    right:
    use Tk;
      while i have not tried it myself, i think its rather safe to say this is not the trouble. if it were, no doubt there would be quite a few other errors, and "Tk.pm" as reported in the error would have never been used. about the actual question however. personally, i just use -w when writing the code, once i start using it full time i usually remove the -w, unless i plan to fix bugs later on. asides, one error isnt bad :)
        i think its rather safe to say this is not the trouble.

        I think it's safe to say that this is quite probably the problem, and that the OP is running on Windows, whose file system is case-insensitive, with confusing errors for those who mess up the case of their use statements.