Tried it as well:
# Debian and CentOS Linux: perl -e 'system("which ls");' /bin/ls
Only on windows it did not work, since i use cygwin to perform most linux like functions...
U:\>perl -e 'system("which ls");' /usr/bin/ls U:\>/bin/ls The system cannot find the path specified. U:\>
What os are you using?
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

In reply to Re^2: getting a problem when I use which command with system function by jbrugger
in thread getting a problem when I use which command with system function by greatshots

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":