in reply to Mapping a drive with Win32::Fileop

$sh = '\\\\machine1\\d\$';
should be
$sh = '\\\\machine1\\d$';
or
$sh = "\\\\machine1\\d\$";

$\ = "\n"; print '\\\\machine1\\d\$'; # \\machine1\d\$ print '\\\\machine1\\d$'; # \\machine1\d$ print "\\\\machine1\\d\$"; # \\machine1\d$

Update:

Some elaboration:

In single quotes strings, you need to escape the delimiter (single quotes) and backslashes followed by another backslash. Lone backslashes may optionally be escaped.

In double quotes strings, you must escape $ (unless you want to interpolate), @ (unless you want to interpolate), the delimiter (double quotes) and backslashes. Other non-alphanumeric characters may optionally be escaped.

Update:

By the way,
{user=>"$us",pass=>"$pa",domain=>"$do"}
is better written as
{user=>$us,pass=>$pa,domain=>$do}
Putting quotes around variables needlessly makes a string copy of them.