Subject: | perl version 5-20 backtick and qx not executing the same fucntion |
Date: | Wed, 12 Aug 2015 10:14:44 -0600 |
To: | bug-Perl-Dist-Strawberry [...] rt.cpan.org |
From: | Trevor A Frederick <Trevor.A.Frederick [...] raytheon.com> |
OS: Windows Server 2008
Strawberry perl 5-20
cygwin 1.5
Windows path env variable has windows entries first then strawberry perl
entries, and the cygwin bin directory last.
A perl script runs
@files = qw("dir $dir /s/b"); where $dir is a valid share (aka
//<myserver/dir)
This will use the windows "dir" command
@files1 = `dir $dir /s/b`; where $dir is a valid share (aka
//<myserver/dir)
This will use the cygwin dir.exe
Tested this by rename the dir.exe in the cygwin/bin directory to
cm_dir.exe and the backtick method then used the windows version of "dir",
renamed cm_dir.exe back to dir.exe and retested, the backtick method used
the cygwin version of dir.exe. The qx method used the windows command
both times. Note the qx method and backtick method are in the same script
and executed in sequence using the same $dir variable. The qx method
returned the expected results.
Thanks!
Trevor Frederick
Sr. Systems Engineer I, with Honors
Raytheon Company
720.858.4310 office