Sayed, Irfan (Irfan) wrote: > Hi All, > > I am executing following line in my perl script. > > chomp(@files = qx("cleartool desc -fmt "%[versions]p\n" > activity:$ENV{"CLEARCASE_ACTIVITY"}")); > > But i am getting following error when i execute the script. > > sh: cleartool desc -fmt %[versions]p: not found > sh: activity:: not found > These errors are caused by sh not knowing what to do with the commands (no command etc. found). The first one would be because it is looking for a command that is that whole string (including arguments) rather than the most likely intended "cleartool" to which the arguments will be passed. This would indeed be caused by the double quotes.
> As per my understanding, double quotes inside the qx is causing the > prob. > > Please guide how to resolve this. > I would start with creating some temporary variables to clean up the code and ensure proper interpolation for debugging (make sure, in particular, that nested quotes are properly escaped). Create one for the command which optionally includes the path to the command (unless it's a command which is expected to be in $PATH), and then a second which has the arguments and then pass those variables to qx without having to worry about quoting. > > Regards > Irfan. > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/