Re: activestate's Tcl.pm question



~greg schreef:
this ...
use Tcl;
my $Interpreter = new Tcl;
$Interpreter->Eval('puts "Hello world"');
$Interpreter->Eval('puts $auto_path');

puts this ...

Hello world
can't read "auto_path": no such variable at ...\test.pl line 4.


I have never used this module, but it seems that the problem is related to the use of single quotes; try instead:

$Interpreter->Eval("puts $auto_path");


JW
.



Relevant Pages

  • Tcl thread local storage memory problem
    ... I am working on an application that originally uses one thread, TCL ... and the C-library to initialize an interpreter and executing standard ... InitializeThreadLocalStorage(); /*If no threads, initialize ... able to get Tcl thread local storage ...
    (comp.lang.tcl)
  • Re: File data format
    ... This is how I always look at data processing with Tcl: ... then let the very effecient tcl interpreter do the parsing. ... Create procs that match the data keys. ... date, commit, and compile, that matched the same signature, then your ...
    (comp.lang.tcl)
  • Re: No argv, argc for worker thread
    ... I expected that a Tcl interpreter started in any manner would accept options ... This is how the interpreter works with command line options ... a "main" script processes command line ...
    (comp.lang.tcl)
  • Re: looking for tcl based Cisco like command line interface
    ... TinyTcl and Jim would be fine to save resources, but first is missing some newer tcl sub-/commands and later has no exec-command at all. ... Only want to install one single tcl/etcl/tclkit interpreter and a single tcl script. ... Funny, the cli can be run from any computer remote,using snmp get/get-next/set for communication to the network device, therefore got a remote console program too. ... extreme environments) based on ARM or Coldfire processor using Debian Linux/ucLinux should be extended with a CLI that is similar in behaviour, handling and naming conventions to the well known cisco command line interface (several user-visible application-specific commands, along with a help, different management operation levels like "enable", "config", line driven only, tab expansion, no special graphics or ascii terminal commands) ...
    (comp.lang.tcl)
  • Re: Asynchronous Event Handlers (Tcl_AsyncCreate) Usage with multiple threads
    ... In one thread I have a tcl script ... being evaluated by a TCL interpreter which must be stopped by another ... I have no way of sending a signal to the first thread. ... > TclExecuteByteCodewill run any async handler. ...
    (comp.lang.tcl)