Re: Using the conditional operator

2002-02-07 Thread Brett W. McCoy
On Thu, 7 Feb 2002, Balint, Jess wrote: > Hello all. I have the following construct: > > $freqidx{$key}[$_] += $fields[$vars[$_-1]] for( 0..$#vars ); > > It is inside some type of loop. What I need to do is use the conditional > operator if possible to do something like this: > > if( $fie

Using the conditional operator

2002-02-07 Thread Balint, Jess
Hello all. I have the following construct: $freqidx{$key}[$_] += $fields[$vars[$_-1]] for( 0..$#vars ); It is inside some type of loop. What I need to do is use the conditional operator if possible to do something like this: if( $fields[$vars[$_-1]] ne "" ) { $freqidx{$key}[$_]