-2

I am trying to put below command in perl system() function.But getting so many compilation errors (syntax).

./istool export -domain serviceshost:9080 -u dsadm -p password -ar test.isx -pre -ds '-base="ENGINEHOST/Dev_Project" Jobs/Batch/\*.*'

I was using it like in perl:

system("./istool export -domain serviceshost:9080 -u dsadm -p password -ar test.isx -pre -ds '-base="ENGINEHOST/Dev_Project" Jobs/Batch/\*.*'");

can some one guide me exactly how to use it in system function?I tried escaping . also with backslash(\) in front of it.

Jim Garrison
  • 85,615
  • 20
  • 155
  • 190
Venkatesh k
  • 19
  • 1
  • 5
  • 1
    [edit] your post and show the errors you get; also show the escaped version. Please take some time to visit the [help] and also read [ask]. – Jim Garrison Feb 09 '17 at 06:34

1 Answers1

0

Replace system with print, and it's obvious you didn't build the string correctly.

If you want to include a " in a string quoted with ", you need to escape it.
If you want to include a \ in a double-quoted string, you need to escape it.

ikegami
  • 367,544
  • 15
  • 269
  • 518