You're confusing = which means assign to with == which asks the 
question, are these equal (numerically) or its cousin eq which asks are 
these the same characters.

James

On Wednesday, September 18, 2002, at 12:48  PM, pravesh biyaNI wrote:

> Hello
> Here is a very simple prblem which unfortunatly i am not able to solve.
> I want to compare a character to a variable and do accordingly. I am 
> using an if loop for this!!
>
> but it seems that even if the variable is not equal to that character, 
> it is entering the loop.. i am not able to figure out the prblm!!
>
> here is the code:
>
>
> for( my $j =0  ; $j < $line_number ; ++$j)
> {
>
> if ( $rows[0][$j] = 'E' )
> {
> print " iam here \n";
> print " the value of the first element is $rows[0][$j] and the value 
> of the sequence number is $rows[5][$j] \n";
> if( $packet_number != $rows[5][$j])
> {
> print "i am also here in $ch_count \n";
> ++($loss);
> }
> ++ $packet_number ;
> }
> else
> {
> print " the value of count is $j \n";
> }
> }
>
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to