in reply to chdir not working

The code you have given is not Perl. // is not a valid Perl comment. Have you adapted this code from a different language perhaps? How about you show us some real code you have run and that demonstrates the problem you are having. Mean time, the following may be the Perlish version of what you are trying to do:

use strict; use warnings; use Cwd; print cwd(); my $path_data = cwd () . "\\data"; #Also want to make the concat in-ca +sesensitive chdir($path_data) or die "Cant chdir to $path_data $!"; print "\n", cwd();
True laziness is hard work