in reply to Re^3: Can't get Dialog or messageBox to work from button
in thread Can't get Dialog or messageBox to work from button

Why do you think that Perl couldn't find displayMsg? The debug output certainly shows that it was found and called. If Perl couldn't find a subroutine, it would have raised an error which the OP would have seen.

Replies are listed 'Best First'.
Re^5: Can't get Dialog or messageBox to work from button
by hotchiwawa (Scribe) on Jan 11, 2016 at 16:50 UTC
    Probably that in Tk methods, Tk prefer to have the address of the functions (object reference).

      But that's what sub { ... } already returns. There is no need to have a subroutine reference that itself returns another subroutine reference when called, especially when you want the function call to happen instead.