use strict; use warnings; BEGIN { print "Starting script on MSWIN\n"; my $pathTCL = "C:/Tcl/bin/tcl86.dll"; print "TCL: " . $pathTCL . "\n"; $ENV{'PERL_TCL_DL_PATH'} = $pathTCL;# showld be the same of: PERL_TCL_DLL } use Tcl; #### Starting script on MSWIN TCL: C:/Tcl/bin/tcl86.dll NpLoadLibrary: could not find Tcl library at 'C:/Tcl/bin/tcl86.dll' at C:/Strawberry/perl/lib/XSLoader.pm line 111. Failed to load Tcl dll! at C:/Strawberry/perl/lib/XSLoader.pm line 111. Unable to initialize Tcl at C:/Strawberry/perl/lib/XSLoader.pm line 111. Compilation failed in require at .\wheel.pl line 11. BEGIN failed--compilation aborted at .\wheel.pl line 11. #### use warnings; use FindBin qw($Bin); BEGIN { print "Starting script on MSWIN \n"; print "My directory: $Bin\n"; my $pathTclDLL = $Bin . "\\tcltk2\\bin\\tcl86.dll"; my $pathTclBin = $Bin . "\\tcltk2\\bin"; print "TCL DLL: " . $pathTclDLL . "\n"; print "TCL BIN: " . $pathTclBin . "\n"; $ENV{PATH}=$pathTclBin; $ENV{'PERL_TCL_DL_PATH'} = $pathTclDLL; print "Printing ENV\n"; print my $path = $ENV{'PATH'}; } use Tcl;