![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Golf/Perlish solution to this problem?by thospel (Hermit) |
on Jan 31, 2008 at 08:34 UTC ( #665305=note: print w/replies, xml ) | Need Help?? |
Without going for total golf (tempting, but I can resist) I'd still write something like:
This breaks the rule of not increasing/decreasing the same variable twice in the same statement, but in practise this will work in all versions of perl5. Notice that in fact it wouldn't work if pre-increment/pre-decrement had been used instead of post-increment/post-decrement
In Section
Seekers of Perl Wisdom
|
|