in reply to File::Spec::Win32; catpath

Add 'use strict' and 'use warnings'. You'll see you're treating 'Users' 'st2641' and 'Desktop' as bareword values, which means Perl doesn't really know, whether they're variables, procedure calls or strings.

I would assume you're aiming to get e.g. "C:\Users\st2641\Desktop\Source_dir". If that's so, you need instead to do:

use strict; use warnings; my $volume = "C:"; use File::Spec::Win32; my $SourceDir = File::Spec::Win32::catfile( $volume, qw ( Users s +t2641 Desktop Source_dir ) ); print $SourceDir,"\n";

Is that more or less what you were after?