I have a Perl script that receives programs and other files from a host system for editing. Once the file is transferred the script launches my text editor and passes it the name of the file. It works fine for me and several colleagues. However, on one user's brand new system (with XP Pro and Perl v5.8.6) it won't launch the editor, instead it brings up the windows dialog for selecting which program to use.

To make it flexible, I read an environment variable that contains the path to the editor. Here's the relevant bits of code:

$EDITOR = $ENV{BASIC_EDITOR};
...
   if ($EDITOR) {
      system( "start $EDITOR $file" );
   }

It seems that windows is seeing something like:

        start  SomeFile

with the editor path being omitted. To track down the cause of this I setup some one line test scripts we could run on this user's system. This example launches Win.ini in notepad:

system( "start \"c:/program files/ultraedit/uedit32.exe\" c:/windows/WIN.ini" );

Again, somehow the program name is disappearing or being ignored. However, running this next script in "c:\program files\UltraEdit" opens Win.ini in UltraEdit like I'ld expect:

        system( "start uedit32.exe c:/windows/WIN.ini" );

Why would it work this way and only on one user's system??

Roy Olsen





_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to