On Tue, Sep 25, 2012 at 10:41 AM, Smylers <Smylers@stripey.com> wrote:
> Damian previously gave an example where == matching would work but eq
> wouldn't, because $_ has been populated with readline and has a "\n":
>
> while (readline) {
> when (undef) { say 'done'; last; }
> when (0) { say 'must be +ve'; }
> when (any 1..9) { say 'digit'; }
> default { die 'horribly'; }
> }
I'm trying to think how often I actually want the "\n" or want it
chomped. If there were a ":chomp" layer, I might use it a lot.
David
--
David Golden <xdg@xdg.me>
Take back your inbox! → http://www.bunchmail.com/
Twitter/IRC: @xdg
Thread Next