in reply to How do I get both the return value and text? backticks vs. system()

If you especially don't want the shell interpreting shell metacharacters, then don't pass the command to the shell, use the 4+ argument form of open.
open(CMD, '-|', '/usr/bin/ls', '$4', '$PATH'); my $output = do { local $/; <CMD> }; close CMD; print "$output\n";
Here is the output, you'll see that the "$4" and "$PATH" were not interpreted as variables before being sent to ls.
ls: 0653-341 The file $4 does not exist. ls: 0653-341 The file $PATH does not exist.