Error in using system() in Perl -


i passing command windows command prompt using perl code. struggling long time , not figure out. can please help?

here command line using:

cleartool find . -version "version(\main\latest)" -exec "cleartool co -nc \"%clearcase_pn%\"" 

and here error when write using system(""):

system(" cleartool find . -version "version(\main\latest)" -exec "cleartool co -nc \"%clearcase_pn%\\"" ");   bareword found operator expected @ test.pl line 9, near "" cleartool find . -version "version"     (missing operator before version?) backslash found operator expected @ test.pl line 9, near "main\" string found operator expected @ test.pl line 9, near ")" -exec ""     (missing operator before " -exec "?) bareword found operator expected @ test.pl line 9, near "" -exec "cleartool"     (missing operator before cleartool?) backslash found operator expected @ test.pl line 9, near "nc \"     (do need predeclare nc?) syntax error @ test.pl line 9, near "" cleartool find . -version "version" execution of test.pl aborted due compilation errors. 

try:

system 'cleartool find . -version "version(\main\latest)" -exec "cleartool co -nc "%clearcase_pn%"'; 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -