Sorry, the code inside of perl.exe that gets run is convoluted (it converts the arguments to exec into a string which it then converts into a list of command words, which are then converted back into a string, *sigh*) and rather buggy. It has also changed between versions of Perl so exactly what works depends on what version of Perl you have.
You could use Win32::Process which gives you much more direct access to what exec ends up calling anyway.
But, you can also just avoid quotes around the executable name which appears to be what triggers several of the bugs. Luckily, these are easy to avoid by using Win32::GetShortPathName():
use strict;
use Win32;
my $date = sprintf("%04d%02d%0d",
(localtime)[5]+1900,
(localtime)[4]+1,
(localtime)[3] );
my $url = "www.moviefone.com/showtimes/closesttheaters.adp?date=$date\
+&skip=5";
my $command = Win32::GetShortPathName(
"C:/Program Files/Internet Explorer/IEXPLORE.EXE"
);
$command = qq($command "$url");
print "$command";
''.<STDIN>;
exec( $command );
which I tested. (:
- tye ('Tye' is not recognized as an internal or external command) |