Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Perl/Tk System Function Error

by afoken (Abbot)
on Nov 18, 2011 at 10:20 UTC ( #938771=note: print w/replies, xml ) Need Help??


in reply to Re: Perl/Tk System Function Error
in thread Perl/Tk System Function Error

removing the double-quotes makes it run [...] Not sure why

Simple: The first argument of the start command, when put in double quotes, is taken as the requested window title. If you need to quote the command to be started, you also need to provide a dummy window title, i.e.:

system('start "" "C:\\program files\\my application\\kaboom.exe" /foo +/bar');

Also note that system() has a special case on Windows to run a program (with arguments) without waiting for it, and without having to mess with any shell or the braindead start program. This is documented in perlport:

system(1,'C:\\program files\\my application\\kaboom.exe','/foo','/bar' +); # ^-- the 1 is the special case for Windows

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://938771]
help
Chatterbox?
marioroy running LWP::Simple on Cygwin in parallel completes in 1 second. Pre-loading essential modules is necessary only on MSWin32 Re: Crash with ForkManager on Windows.
marioroy LWP::Simple works best with Perl v5.26 on Windows. Any Perl version is fine on Cygwin and Unix.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2017-09-23 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (272 votes). Check out past polls.

    Notices?