Perl-Sensitive Sunglasses | |
PerlMonks |
Re: DWIM Part Nineteen: Unary Operators in Void Contextby clemburg (Curate) |
on Aug 21, 2001 at 14:31 UTC ( [id://106503]=note: print w/replies, xml ) | Need Help?? |
The second question relates a bit more to the title... After all, "lc $foo;" certainly doesn't DWIM now... and I'm wondering if it's unreasonable to expect Perl to work this way. Certainly, I've been known to want crazy things from Perl before... is this an exception, or just more uneducated rambling? In a language like Perl, where you can define your own subroutines and even override the built-in functions (see Camel III, Chapter 11, Overriding Built-in Functions, p. 306), and do that even so that other modules can't detect it, I see really no reason for you to expect that the perl that *all we others* get should do what *you* want. Seriously, why don't you just implement the behaviour that you want with your own subroutine (or overridden built-in). Don't expect others to agree to your choices. Make your choices and implement what you need. (If you are really tempted, join the Perl6 effort and try to get your suggestions accepted.) To quote Alan Perlis again: "Invent and fit - have fits and reinvent."
Christian Lemburg
In Section
Meditations
|
|