Depending on how you do the system call and the backtick call,
there may be subtle differences in how perl and/or the sub-shell
are interpolating things that look like variables (or are not
interpolating things that you believe should be treated as
variables). It would be helpful if you could
post the actual system and backtick lines from your code,
along with any relevant snippets that assign values to any
variables involved.