in reply to Appending values to variable.

"join" is the opposite of "split".

my $path = join '\\', @dirs;

You can append data to a variable using the concaternation operator '.'

$path = $path . '\\' . $file;

You can also just use string interpolation.

$path = "$path\$file";

But your original problem can probably be most easily solved with the tr/// operator.

$file =~ tr|/|\\|;
--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg