473,385 Members | 2,069 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,385 software developers and data experts.

system command in perl

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
May 27 '10 #1
2 2503
kleach
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
nithinpes
410 Expert 256MB
If you want to return the control without closing the notepad, use:
Expand|Select|Wrap|Line Numbers
  1. $res=exec("notepad.exe");
  2.  
Jun 28 '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...
3
by: rmasi | last post by:
I am using some CGI Perl code as part of a web site I am developing on a windows xp machine. I had this working fine on one computer, but I had to move this to another windows xp machine and now the...
2
by: MoshiachNow | last post by:
HI, I work locally on a Windows machine,no servers ! I display a big HTML log ,that includes 2 frames of JS. At the end of my HTML file,after 2 frames are build,I want to run a Windows system...
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
9
by: skyy | last post by:
Hi i am trying to use the system() command to run some linux command using perl script... Eg.. Deleting files. system("rm $filename"); However, when my $filename contain " character, the...
4
by: idorjee | last post by:
Hi, can anyone plz help me. I'm trying to run the 'pepwindow' program on the input from my html form, and my script doesn't work. The following '-goutfile' option in the system command is for the...
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...
1
by: smy | last post by:
hi, I have a perl-cgi script in which i have to run a exe file.For this i have used a system command.but it's not working.. The same program with the same parameters is running from command line as...
1
by: Archanak | last post by:
Hi, I am using system command to call a program. system("perl mail.cgi"). To this i want to pass an argument? How do i pass an argument to system command?
4
nithinpes
by: nithinpes | last post by:
I will boil down my exact requirement to this: I should print out lines that do not contain semi-colon, backslash and closing parentheses. The following one -liner works fine. perl -ne "unless(//)...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.