Re: filling an array

2003-08-26 Thread Rob Dixon
Marcos Rebelo wrote: > try > > @temparry = `"$lcf_tools\\pslist EXCEL"`; > foreach $temp (@temparray){ > next if $temp !~ /EXCEL/; > ($name,$pid,$pri,$thd,$hnd,$Mem,$usertime,$kerneltime,$elapsedtime) = > split(" ",$temp); > ... > } Better would be next if $temp !~ /^EXCEL/; which is 'doesn

Re: filling an array

2003-08-26 Thread Rob Dixon
Zsdc wrote: > > Anthony J Segelhorst wrote: > > > I am working on script to kill a process if it have been running for 45 > > minutes or more. > > > > I am using a pstool called pslist to gather the data on the process. This > > out put looks like: > > (...) > > > > I started to build my array by

Re: filling an array

2003-08-26 Thread Rob Dixon
"Anthony J Segelhorst" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am working on script to kill a process if it have been running for 45 > minutes or more. > > I am using a pstool called pslist to gather the data on the process. This > out put looks like: > > C:\Tivoli\lcf\bin

Re: filling an array

2003-08-26 Thread zsdc
Anthony J Segelhorst wrote: I am working on script to kill a process if it have been running for 45 minutes or more. I am using a pstool called pslist to gather the data on the process. This out put looks like: (...) I started to build my array by doing: @temparry = `"$lcf_tools\\pslist EXCE

RE: filling an array

2003-08-26 Thread Marcos . Rebelo
try @temparry = `"$lcf_tools\\pslist EXCEL"`; foreach $temp (@temparray){ next if $temp !~ /EXCEL/; ($name,$pid,$pri,$thd,$hnd,$Mem,$usertime,$kerneltime,$elapsedtime) = split(" ",$temp); ... } for avoiding errors, use 'strict' module at beggining of the script do use strict and define all