which foo >/dev/null command -v foo >/dev/null 2>&1 type foo >/dev/null 2>&1 hash foo 2>/dev/null
if [[ -n “${commands[perlbrew]}” ]] ; then … fi
which foo >/dev/null command -v foo >/dev/null 2>&1 type foo >/dev/null 2>&1 hash foo 2>/dev/null
if [[ -n “${commands[perlbrew]}” ]] ; then … fi