What is the difference between the cd shell command and the Perl function chdir? Please can you explain with an example?