Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm on a Windows OS. I've tried untainting the string as outlined in the Camel book, p.562, with a regex. I've tried all combinations of arguments, quotes, no quotes- nothing seems to work. The best I've done is:
which produces the message: Cant exec PATHNAME: Permisson denied.exec {$args[0]} @args
It will work if I hard code the PATHNAME after exec(),e.g.
But if $string = "C:\\Eudora\\ eudora.exe", then exec $string or exec "$string" won't work.exec "C:\\Eudora\\eudora.exe"
Win32::Process won't work either passing $string in as the command. The reason I'm doing it this way is because the PATHNAME stored in $string has to change depending on choice of program to run.
update (broquaint): much formatting added and a 'then' in the second to last paragraph
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using a variable for PATHNAME in exec()
by pg (Canon) on Nov 16, 2002 at 20:30 UTC | |
|
Re: Using a variable for PATHNAME in exec()
by AcidHawk (Vicar) on Nov 18, 2002 at 07:45 UTC |