Loading ...
Sorry, an error occurred while loading the content.

Re: I cannot understand this output....pls explain.

Expand Messages
  • rrreddy0211
    Hi, == is a numeric comparsion operator, so it assumes variables to be in numeric form. Since here variable values are non-numeric, they are treated as zeros
    Message 1 of 3 , Feb 4, 2004
    • 0 Attachment
      Hi,

      == is a numeric comparsion operator, so it assumes variables to be in
      numeric form. Since here variable values are non-numeric, they are
      treated as zeros and hence the result will be true and 'fine'
      statement is printed out.

      Hope this is clear.

      - Reddy.

      --- In perl-beginner@yahoogroups.com, "fd97616" <fd97616@y...> wrote:
      > $a = "Hello";
      >
      > $b = "world";
      >
      > if ($a == $b){
      > print "Fine\n";
      > }
      >
      >
      > this is the code....
      > here the Fine is getting printed....
      >
      > so actaully means that $a is equal to $b...
      > how is that possible.....
      > I cannot understand this.
      >
      > can someone please explain this to me.
      > thanks.
      > kaushik.
    Your message has been successfully submitted and would be delivered to recipients shortly.