in reply to Re^3: confused path
in thread confused path

system("which $prog") would be passed through the shell. exec $prog would not be. The shell could run startup script which modify $PATH.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^5: confused path
by Anonymous Monk on Oct 09, 2012 at 14:55 UTC
    Indeed. That reminds me case of cron where $PATH may be restricted unless modified.