By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,812 Members | 1,978 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,812 IT Pros & Developers. It's quick & easy.

system command in perl

P: 10
Hi All,
Greetings. May be simple issue but your help sought.
I am executing the system command like
$res=system("notepad.exe"); thro a perl file named

At command prompt - when I enter
perl , I could see that notepad was opened but the control - I say as prompt ( in windows) does not return back.
It looks like perl response is hanging.
I have to stop the precess with ctrl+c

Any idea ??
Envn - Windows XP
This is perl, v5.8.9 built for MSWin32-x86-multi-thread
May 27 '10 #1
Share this Question
Share on Google+
2 Replies

P: 15
My perl version seems to do what I expect.
This is perl, v5.10.1 built for MSWin32-x86-multi-thread

It runs the system command and waits syncronously for the return of the application. Once notepad ends, the perl script ends and the DOS window returns to the prompt.
Jun 23 '10 #2

Expert 100+
P: 410
If you want to return the control without closing the notepad, use:
Expand|Select|Wrap|Line Numbers
  1. $res=exec("notepad.exe");
Jun 28 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.