use the $ENV hashtable...
$path = "C:\\documents\\".$ENV{USERNAME}."\\dir1\\dir2";
or, you could use USERPROFILE instead, which will work more readily across windows versions.
$path= $ENV{USERPROFILE}."\\dir1\\dir2";
Or, you could make a more generic cross platform solution by using FILE::HOMEDIR, and dump environment variables altogether...
use File::HomeDir;
$path=home()."\\dir1\\dir2";