Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
if ($2) behaves differently than if (defined $2)by walto (Pilgrim) |
on Apr 15, 2008 at 17:35 UTC ( [id://680590]=perlquestion: print w/replies, xml ) | Need Help?? |
walto has asked for the wisdom of the Perl Monks concerning the following question:
I thought that if (defined $2) is just a better readable way than if ($2). But I found that gives different results: gives : 50.00 as I would expect but gives 50. Can an enlightend monk explain why?
Back to
Seekers of Perl Wisdom
|
|