my $newpath = join '\\', @dirs; #### $filepath =~ tr!/!\\!;