All, I have cdwincontext installed and I am trying to run texmfstart from a perl script on windows. I tried associating file extension .rb with the ruby that comes with the context distro. Am I missing something here? #!/usr/bin/perl use warnings; use strict; my $os; if ($^O =~ /darwin/i || $^O =~ /linux/i) { $os = 'nix'; } else { $os = 'win'; } my $TMS; if ($os eq 'nix') { $TMS='/usr/local/teTeX/share/texmf.local/scripts/context/ruby/ texmfstart.rb'; } elsif ($os eq 'win') { $TMS = 'c:\isoimage\usr\local\context\tex\texmf-local\scripts\context \ruby\texmfstart.rb'; } opendir my $dirH, '.'; while ($_ = readdir $dirH) { next if $_ =~ /^\.+/; next unless $_ =~ /^section\d+figs\.tex$/; for my $run ('first','second') { print "Processing file $_ ($run run)\n"; `$TMS texexec $_`; } } closedir $dirH;