> -----Original Message----- > From: Somu [mailto:[EMAIL PROTECTED] > Sent: Friday, September 21, 2007 08:27 > To: Beginners@perl.org > Subject: System > > About that PID problem, i found a program in Windows named tasklist, > it prints all the processes running on the system with its id. I used > the system command to execute the tasklist, like as > > my $data = system "tasklist" ; > > but i got nothing in $data. How can i get the data from the > system command? system only returns whether it was successful or not ( ie 0 or non zero ). If you want to capture that output, then use the backtickslike
my $data = `tasklist`; Now you can parse the list for what you are looking for. Wags ; ) > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > ********************************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ********************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/