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

Dear Monks

Very simply, I am writing $folder = $entryfolder->get; where $folder holds the result of applying the get method to the entry widget called $entryfolder, but I get "can't call get on an indefined object" error.

I am looking to get what my user has entered in the entry widget. I don't understand because I have my $folder; and my $entryfolder; as global variables.

I would be most greatful for any hint!

claire

Replies are listed 'Best First'.
Re: The entry get method in perl Tk
by moot (Chaplain) on Apr 13, 2005 at 21:03 UTC
    $entryfolder is undefined. Post the part of the code where you expect it to be defined. It may be that the $entryfolder->get line occurs logically before the definition of $entryfolder.

      Thank you moot.

      I did not realize that I had declare my $entryfolder twice!

      Claire

        If you
        use warnings; use strict;
        it makes those errors easy to find.

        I'm not really a human, but I play one on earth. flash japh