my $real_prog = 'agent.exe'; my $path = File::Spec->canonpath('c:\program files\agent'); chdir ($path); system ($real_prog) if (-f $real_prog);