in reply to relative paths...

mkdir "$dir1\\BC_TESTCASES" will fail if $dir1 does not exist.
Consider using File::Path, for example
#!perl use strict; use File::Path 'make_path'; my $dir = 'xyz1'; make_path("$dir/BC_TESTCASES",{verbose=>1}) or warn "$!";
poj