in reply to Re: how do i add a switch to executable
in thread how do i add a switch to executable
You probably want to change the double quotes around "c:\pathname" to single quotes 'c:\pathname' to supress interpolation of the \p. You can also call programs using backtics for example:
$flg = "/?"; $dir =`dir c: $flg`; print $dir;
You will note that the help flag /? has been interpolated into the backtics so that the command executed is the same as:
C:\>dir c: /?
The output is captured into $dir which we then print. As a general rule it is much better (read more secure, more reliable, more portable, perhaps faster) to use inbuilt perl functions than backtics or system.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n\w+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|