Title: combining functions & using there return values

in the following scenario I tried to nest lc() within a grep and wasn't able
to get expected results. the following greps the output of unix "ps" looking
for Oracle SID apache processes and is expecting a count greater than 0.

if ((grep /$(lc($SIDS[$x]))ora.*Apache*/, `ps -aef`) > 0)

~~~what "appears" to work:

my $temp=lc($SIDS[$x]);
if ((grep /($temp)ora.*Apache*/, `ps -aef`) > 0)


Can I nest functions the way I am attempting in the first example above? Also,
it would seem like using ()'s in the second example would cause it to look
for ()'s as well. the end string to be grepped for should be
"testora.*Apache*" if $SIDS[$x] was "TEST". 

TIA

Reply via email to