($rad) = $telobj -> cmd ("cd /usr/local/etc/httpd/logs"); #### ($rad) = $telobj->("pwd"); if($rad eq '/usr/local/etc/httpd/logs') { print "cd command successful. working directory is $rad\n"; } else { print "cd command failed. working directory is $rad\n"; } #### ($rad) = $telobj -> cmd ("cd /usr/local/etc/httpd/logs"); if($rad) { die "Can't change directory: $rad\n"; }