in reply to Re^2: The date last monday
in thread The date last monday

"Am I asking to much to do this all in one go?"

Well. no, as previous posters have demonstrated. On the other hand, if I were to encounter a one-liner 'solution' in a code-review I'd flag it as a 'Maintenance problem'. The one-liner is cute and quirky and flashy. But the purpose of code is to be readable at 0300 by a half-asleep bloke who just got to the pager before it woke the Baby. I vote for simple and verbose every time.

----
I Go Back to Sleep, Now.

OGB

Replies are listed 'Best First'.
Re^4: The date last monday
by Scarborough (Hermit) on Oct 03, 2006 at 12:35 UTC
    I'm with you, the orginal verbose version will stay in the code. However I have enjoyed the Monks contributions on this subject and from setting myself the challange have learnt about POSIX and map and how to pad sprinf which was not in the nutshell book. So for me a very worth while question. Thanks everyone