My Questions :
1. I would like to know the difference between $MAIN::xyz == 0 and $MAIN::xyz == '0'.
2. Is MAIN a key word in Perl?
3. A situation in our program, $MAIN::xyz is not set to any value any where. At some point, I see a if ($MAIN::xyz == 0) condition. I can see that while the code is executed, it does go in to this condition (the condition getting satisfied i.e). Is this statement getting evaluated as "Whether the $MAIN::xyz exists or not" OR is it being evaluated as "$MAIN::xyz has a value of 0 or not".
It is a bit confusing. Any body can throw light on this one? Thanks in advance.
1. I would like to know the difference between $MAIN::xyz == 0 and $MAIN::xyz == '0'.
2. Is MAIN a key word in Perl?
3. A situation in our program, $MAIN::xyz is not set to any value any where. At some point, I see a if ($MAIN::xyz == 0) condition. I can see that while the code is executed, it does go in to this condition (the condition getting satisfied i.e). Is this statement getting evaluated as "Whether the $MAIN::xyz exists or not" OR is it being evaluated as "$MAIN::xyz has a value of 0 or not".
It is a bit confusing. Any body can throw light on this one? Thanks in advance.