M
Michael
Hi,
my application reads several paths from a configruation file.
Some of these paths pointing to an executable which are to start
with an input file. Example: Adobe Reader with a pdf-file.
The executables are stored in c:\Program Files\...
When I try to execute the following, Perl is obvioulsy not able
to handle the spaces within the path information correctly and
aborts with
'c:/Programm' is not recognized as an internal or external command,
operable program or batch file
Does anyone know a solution or could help me?
perl-code:
use Config::Simple;
Initiale('cfgfile.ini');
################################################
sub Initialize {
################################################
my $cfgfile = shift;
my $cfg;
$cfg = new Config::Simple($cfgfile) or Error(20,[$cfg->error]);
# read path section
$p2adobe = $cfg->param("path.adobe");
$p2pdf = $cfg->param("path.pdf");
exec( $p2adobe.' '.$p2pdf.'test.pdf' );
} # Initialize
cfgfile.ini:
[path]
adobe = 'c:/Program Files/Adobe/Acrobat 7.0/Reader/AcroRd32.exe';
pdf = 'e:/PDF/';
my application reads several paths from a configruation file.
Some of these paths pointing to an executable which are to start
with an input file. Example: Adobe Reader with a pdf-file.
The executables are stored in c:\Program Files\...
When I try to execute the following, Perl is obvioulsy not able
to handle the spaces within the path information correctly and
aborts with
'c:/Programm' is not recognized as an internal or external command,
operable program or batch file
Does anyone know a solution or could help me?
perl-code:
use Config::Simple;
Initiale('cfgfile.ini');
################################################
sub Initialize {
################################################
my $cfgfile = shift;
my $cfg;
$cfg = new Config::Simple($cfgfile) or Error(20,[$cfg->error]);
# read path section
$p2adobe = $cfg->param("path.adobe");
$p2pdf = $cfg->param("path.pdf");
exec( $p2adobe.' '.$p2pdf.'test.pdf' );
} # Initialize
cfgfile.ini:
[path]
adobe = 'c:/Program Files/Adobe/Acrobat 7.0/Reader/AcroRd32.exe';
pdf = 'e:/PDF/';