See in-line comments:

> -----Original Message-----
> From: pravesh biyaNI [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 18, 2002 1:48 PM
> To: [EMAIL PROTECTED]
> Subject: simple problem
> 
> 
> 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' )

The above line sets $rows[0][$j] to 'E' use instead:
if ( $rows[0][$j] eq 'E' ) ## for string comparison


> {
>  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]
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


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

Reply via email to