in reply to How do I change directory to root directory

Your script works for me. What error do get in $! ?
can you try adding debug statements like:
my $cwd = `pwd`; print ("$cwd\n");

As a side note, you can pass a full path to an open statement. You don't need to be in the same directory as the file to open it and get a valid filehandle.

You've probably truncated your script and you say that your die statement does print, so this might not be applicable, but you should see perlfaq 8.34. A script can't change the parent shell's directory.