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

I recently decided to take a challenge my dad gave me: to make a program in perl that has a normal windows 95/98/me look/feel to it that passes a dos-based command line program a string of arguements based on checkboxes etc. that were set in the perl program. Basically what he challenged me to do was make a windows GUI for a dos based program. I was told that Perl/Tk was the module to do this, but I really don't know where to start. Does anyone know of some good tutorials on building programs with Perl/Tk?

Replies are listed 'Best First'.
Re: Perl/Tk
by dystrophy (Monk) on Jan 28, 2001 at 14:46 UTC
Re: Perl/Tk
by the_slycer (Chaplain) on Jan 28, 2001 at 13:59 UTC
    I have written a couple apps in perl Tk, and it's not too bad once you get the hang of it. The O'Reilly book is OK, but not great, some examples to get you started, but I'm still not sure whether it was worth paying for. I think I learnt more about Tk by grabbing a bunch of perl Tk applications and browsing through the source. The nice thing about this is that you don't really have to understand what the program is doing, as the GUI creation is seperate from the back end.

    Having said that, Tk is nice for cross platform applications, but for something that would look more like an actual windows application you might want to look into Win32::Gui instead. I have little experience with this, but it does create a more window'sd look and feel than Tk does.
Re: Perl/Tk
by a (Friar) on Jan 28, 2001 at 10:11 UTC
      O'Reilly has a book

      Actually, O'Reilly have 2 books, the Learning book, and the pocket reference. The Learning book isn't really much good, but Amazon currently have it at 70% off. (I really don't understand their pricing here. I got my copies at $4.95 from them, thinking it was a pricing error, but they've now only put it up to $10.48)

      Manning also have one coming out that's supposed to be much better, so it might be better to wait for that.

      Tony

(ichimunki) Using Tk
by ichimunki (Priest) on Jan 29, 2001 at 05:36 UTC
    Tk is an excellent GUI system for building Perl apps on Windows.

    I've got Nancy Walsh's book, "Learning Perl/Tk" from O'Reilly and I recommend it if you're the book type. Otherwise, I'd skip it. Her book is pretty good, but it's dated. And her style does not match the module author's style very much.

    The single best source of good examples of Tk code come bundled with the Tk800 module. Once installed, you can type "widget" from a DOS prompt and get an interactive demo of all kinds of features of the module with easily viewed code for the examples. It doesn't get better than that.

    The Tk perldocs are so-so in many places, but I've used the widget demo to get me past some sticky spots before. It's very handy.
      Thanks, I'm checking it out right now and it looks pretty promising!
        Hey Tye and all you other guys who helped me out at the CB earlier, thanks! I finally found that I just had a corrupted zip file (must have got corrupted when I downloaded it, because the original was fine). When I uninstalled and reinstalled, everything worked great! Thanks for all your help.
Re: Perl/Tk
by MeowChow (Vicar) on Jan 29, 2001 at 02:29 UTC
    If you really want to get a Windows look and feel, you'll find that Tk, while considered the de-facto GUI standard, will not give you the sort of widgets you may be accustomed to. For this reason, you may want to check out Win32::GUI as well, which uses native Win32 API calls to generate dialog boxes and common controls.

    update(doh!): i should really get into the habit of reading people's replies to questions before repeating what has already been said :)