That would be the sane thing to do. On Windows 8:
C:\>perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x
+86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2012, Larry Wall
Binary build 1603 [296746] provided by ActiveState http://www.ActiveSt
+ate.com
Built Mar 13 2013 11:29:21
Perl may be copied only under the terms of either the Artistic License
+ or the
GNU General Public License, which may be found in the Perl 5 source ki
+t.
Complete documentation for Perl, including FAQ lists, should be found
+on
this system using "man perl" or "perldoc perl". If you have access to
+ the
Internet, point your browser at http://www.perl.org/, the Perl Home Pa
+ge.
C:\>perl -e "print `dir \C:\Program Files`; print \"\nerror: $!\n\" "
File Not Found
Volume in drive C is Windows8_OS
Volume Serial Number is 78A2-8234
Directory of C:\
Directory of C:\
error:
C:\>perl -e "print `dir \"C:\Program Files\"`"
Volume in drive C is Windows8_OS
Volume Serial Number is 78A2-8234
Directory of C:\Program Files
07/08/2014 09:31 AM <DIR> .
07/08/2014 09:31 AM <DIR> ..
[redacted directory list]
0 File(s) 0 bytes
45 Dir(s) 137,746,575,360 bytes free
C:\>
Windows 7 does much the same.
But you do bring to mind a good point: Is perl in the path?
|