in reply to writing to a users "My Documents" folder

Try getlogin
my $login_name = getlogin; my $path = "C:\\Documents and Settings\\$login_name\\My Documents\\";

Replies are listed 'Best First'.
Re^2: writing to a users "My Documents" folder
by Anonymous Monk on Jan 28, 2009 at 10:09 UTC
    "Documents and Settings" can change, but %USERPROFILE won't