![]() |
|
Think about Loose Coupling | |
PerlMonks |
New Discovery!!! (sub call without parentheses)by harangzsolt33 (Hermit) |
on Dec 08, 2018 at 02:19 UTC ( #1226936=perlquestion: print w/replies, xml ) | Need Help?? |
harangzsolt33 has asked for the wisdom of the Perl Monks concerning the following question:
I have noticed something very interesting!!! When I declare a sub, then I can call that sub without parentheses, but if I want to call that sub before the declaration, then I need to use parentheses. Why is that???? I mean what's the logic behind this behavior?
If I flipped this around, then I'd get an error, but I don't understand why...:
Back to
Seekers of Perl Wisdom
|
|