#-- test perl program to determine set up use strict; use warnings; print "\n\nTest program to determine OS/File paths as seen by Perl \n\n"; #-- get the OS variable print "\nOperating system as returned by \$^O variable is:\t $^O\n"; #-- list of directories my @files = ( 'C:\program files\merant build', 'C:\PROGRA~1\merant build' ); foreach my $file ( @files ) { print "Long Path:\t$file\nShortPath:\t" . Win32::GetShortPathName($file) . "\n\n"; } #### Test program to determine OS/File paths as seen by Perl Operating system as returned by $^O variable is: MSWin32 Long Path: C:\program files\merant build ShortPath: C:\PROGRA~1\merant build Long Path: C:\PROGRA~1\merant build ShortPath: C:\PROGRA~1\merant build