Forgive me (or reap me) if this is too off topic.

Disclaimer: I don't want to start a holy war with this, and I don't want to rant (or recieve rants :) about how one is greater than the other.

Background

Currently I have been using Perl almost exclusively for wrinting test automation. I am currently being merged into another team at the company I work for, and they use TCL/Expect almost exclusively. I have been told that I will still be able to use Perl (whew!), but I really need to pickup TCL as I will be integrating with existing code, and possibly be required to maintain or even write new TCL.

What I need to know

This is really a 3-part question.

Any pointers on picking up TCL with a C/Perl background?

  • Good books?
  • Good web sites?
  • Good (objective) comparisions to Perl?

    Any pointers to effecivly mixing Perl and TCL?

  • Easy ways to call TCL API's from Perl?
  • Can I use TCL/(TCL)Expect from perl? (I found Tcl.pm and Expect.pm, they will be very helpful and useful I'm sure, but I have not found a way to use the TCL-Expect from Perl)

    And last but not least

    How to port existing TCL to Perl quickly?

  • I want to proof of concept (at a later date) the fact that porting some of thier TCL (the code that is more suited to Perl) to Perl will not be hard. Is it?

    Thanks for any input you may have. I'm reasonably sure I can pick up TCL quickly, but getting pointers on how to integrate it with Perl and leverage my existing code base would be invaluable.

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!
  • Replies are listed 'Best First'.
    Re: OT (maybey) - Perl -- TCL
    by Juerd (Abbot) on Apr 29, 2002 at 22:02 UTC
    Re: OT (maybey) - Perl -- TCL
    by Kanji (Parson) on Apr 29, 2002 at 22:53 UTC
    Re: OT (maybey) - Perl -- TCL
    by coreolyn (Parson) on Apr 30, 2002 at 14:02 UTC

      I've been integrating Perl and TCL for about the last 6 months or so. My approach has been to use Perl to collect all configuration variables from conf files and provided arguments, Passing them to TCL by means of writing a temp TCL init file, then launching the TCL scripts. The primary online reference for TCL that I've used is the same as Kanji's, and haven't needed to purchase a book (which is unusual).

      As for a comparison I find TCL slower, more syntatically demanding, but very stable to work with. It's like working on an old car, heavy and bulky but effective enough.

      If your comfortable with Perl and C you'll have no problem picking up TCL in no time.

      coreolyn
    Re: OT (maybey) - Perl -- TCL
    by DigitalKitty (Parson) on Apr 30, 2002 at 15:03 UTC
      Hi.

      Book recommendation:

      Practical Programming in Tcl and Tk
      Brent B. Welch
      ISBN: 0130220280
      List Price: $45.00

      If you wanted to learn Perl/Tk, I *highly* suggest:
      Mastering Perl/Tk
      O'Reilly publishing
      $44.95
      Great book.
      -Caitlin.
    Re: OT (maybey) - Perl -- TCL
    by brianarn (Chaplain) on Apr 30, 2002 at 17:36 UTC
      The online resource that Kanji mentioned is good, and the other book that has been mentioned before seems to be a good book when I'd looked at it in bookstores, but when I had to pick up TCL I was a poor college student (well, I am again now :P ) and so I picked up a quick Sams book:

      Sams Teach Yourself Tcl/Tk in 24 Hours.
      This book was a good quick resource for TCL - didn't dive into the language in nearly the depth that I'm sure other books do, but it was a handy desktop reference.

      Before I really got into Perl, I was writing CGI in TCL for this company that I worked for, and I was Required to use TCL, even though I'd heard 'good things' about Perl. Once I knew a bit of Perl, it was easy to convert everything I'd done over into Perl - wasn't exactly a copy-and-paste, but most things came over pretty easily, and Perl regexes and modules made parsing through my CSV file a lot handier than a nasty nasty TCL regex.

      ~Brian