It's incredibly easy using Win32::OLE
. You can use the application object named WScript.Shell
my $wsh = new Win32::OLE 'WScript.Shell';
my $desktop_path = $wsh->SpecialFolders('Desktop');
You can inquire about lots of other special folders using this interface:
I don't know what versions of Windows have the WScript.Shell interface. The only Perl dependency is the Win32::OLE
The 6th Rule of Perl Club is -- There is no Rule #6.