[tcltk-perl] Re: Invoke the tclsh and wish from perl script
Brought to you by:
hobbs
From: Jeff H. <je...@Ac...> - 2005-01-08 22:10:44
|
M.Srinivasa Rao wrote: > Presently I am working on windows OS.I have Perl and Tcl software in my > system. I want invoke the Tcl interpreter from the perl script and execute > the Pkg_mkIndex utility and return to perl script. > I am able to invoke the Tcl interpreter from shell script using the > following lines of statements. > ########################## > #! /usr/tcl/bin/tclsh8.0 > pkg_mkIndex . *.tcl > exit > ######################### > Like this I want to invoke tclsh and wish from the perl script. If you have the Tcl module for Perl working, then you would just instantiate the interpreter, like so: my $interp = new Tcl; and you can call anything in Tcl with the various methods: $interp->call("pkg_mkIndex", ".", "*.tcl"); or $interp->Eval("pkg_mkIndex . *.tcl"); the Tcl pwd should match Perl's. -- Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos |