Re: check array contents.
- From: "Marcel" <downloads666@xxxxxxxxxxx>
- Date: 28 Jun 2006 08:33:10 -0700
Maybe you should provide us some script examples of what you have done
so far.
But my guess is that you might be looking for something like this:
foreach (@array) {
if (/OK$/) {
}
}
Hope that helps,
Marcel
sunilsushil@xxxxxxxxx wrote:
i hae got a response from my server..i took into an array and displayed
the output of the response...its 4 lines..
[RESULT]
Presence database : OK
Location database : OK
GDS : OK
LDS : OK
now i want to check the response. for each database....if its OK or if
its
ERROR..
how to check each line seperately ..i mean perform a check on OK on
each line...
i tried to split using : delimiter..but RHS is having value OK Location
databse...ie from one : to the next :
so how to check..
i tried putting RHS value into a variable and print that variable it
shows..
OK Location database instead of OK..
so am not able to perform check ..it fails..saying OK not equal to OK
Location database
why is it showing like that..
how to do a check for Ok on each line..
please help me..
thanks in advance..
.
- References:
- check array contents.
- From: sunilsushil
- check array contents.
- Prev by Date: Re: Windows XP ppm and perldoc problems
- Next by Date: Trouble parsing text with bioperl
- Previous by thread: check array contents.
- Next by thread: error when install GetOpt::Tabular
- Index(es):