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
Post a Comment