Don't ask to ask, just ask | |
PerlMonks |
Re^5: Make $^V and "my" implicitby chromatic (Archbishop) |
on Feb 03, 2014 at 19:56 UTC ( [id://1073258]=note: print w/replies, xml ) | Need Help?? |
Pre-declaration can be achieved by assigning an empty string or an empty list. Now you've overloaded the assignment operator to perform both declaration and assignment, depending on its second operand. How far are you going to take this? Does this apply only to constant operands? What if you assign an empty string returned from a function? What if you want to clear a variable in an inner scope? How do you disambiguate between assignment and declaration then?
In Section
Seekers of Perl Wisdom
|
|