CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Win32 Programming Help:
quotes in exec paths



Apr 18, 2010, 8:13 PM

Post #1 of 1 (5495 views)
quotes in exec paths Can't Post

I am using ActiveState 5.8.8 under XP Home.
I want to display a web page by running
Microsoft Internet Explorer with the perl exec
command. The names of two of the folders in the
browser path contain space characters. The windows
command prompt program (shell) requires quotes
around the path to resolve the ambiquity that these
spaces cause. The following command
executes correctly from the command prompt:

"C:\Program Files\Internet Explorer\iexplore.exe"

My question is, how can I submit this command from perl.

The exec command in the following program
throws an exception (Invalid Argument).
The accompaning error message shows that the command was
formed exactly as shown above.

use strict;
use warnings;
= q("c:\\)
. q(Program Files\\)
. q(Internet Explorer\\)
. q(iexplore.exe")
my $web_page = q(;

exec $BROWSER, $web_page ;


I am aware that I can work around the problem
by using the short aliases for the folder names:

use strict;
use warnings;
= q(c:\\)
. q(progra~1\\) # Program Files
. q(intern~1\\) # Internet Explorer
. q(iexplore.exe)
my $web_page = q(;

exec $BROWSER, $web_page ;

Good Luck,


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives