473,404 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

system command in perl - prompt does not return back - window

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 aa.pl.

At command prompt - when I enter
perl aa.pl , 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
edit reply report
May 27 '10 #1
2 3709
RonB
589 Expert Mod 512MB
The system function will block until the executed command completes, which in this case is when you close/exit notepad.

Please read: `perldoc -f system` http://perldoc.perl.org/functions/system.html

If you want to create a detached process, you could use the Win32::Process module.
http://search.cpan.org/~jdb/Win32-Pr....14/Process.pm
May 27 '10 #2
@Selva123
You can use the exec command to create a detached process.

Expand|Select|Wrap|Line Numbers
  1. exec("notepad.exe")
Jun 8 '10 #3

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

Similar topics

3
by: Nicolas Fleury | last post by:
Hi, How can I know if a system command doesn't exist? All the ways I have tried behave like if the system command was existing but returning one. I don't want to sound provocative, but open in...
6
by: jsw_nz | last post by:
Helo, my first post here.... I am trying to run an agent application that converts and imports two tables from MS Access into mySql. (Intelligent Converters - Access2mySql) I have run similar...
3
by: Billy Cormic | last post by:
Hello, I would like to write a windows application that can get the IP address of the computer the appliation is installed on. Then the program should ftp a file to another computer. I have no...
3
by: _IS_ - | last post by:
I have the problem that shelling in vb.net is not working for me at this point. I am trying to make a graphical application to netsend (multiple) PCs on the network(notwork) and to ping to check...
4
by: arnuld | last post by:
1.) we usually say /return 0/ indicates success e.g #include <iostream> int main() { int i=3; std::cout << i << std::endl; return 0;
0
by: shanmugam | last post by:
Hi All How can i hide the command prompt window when executing the system command in perl. Thanks in advance Shanmugam
1
by: roocell | last post by:
I'm running a system command on my server system(copy file.txt lpt1); to print a file to lpt1. This works fine on an XP machine and also works fine on the vista machine if i do it manually...
8
by: jkeith07 | last post by:
Ok so ive reached the end of my knowledge and have tried to find out how to do it and just plain dont understand it. I have a system call: system("db2cmd.exe \"db2 connect to vop9 user...
2
by: Selva123 | last post by:
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 aa.pl. At command prompt - when I enter ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.