in reply to Re: 99 Problems in Perl6
in thread 99 Problems in Perl6
Good points, thank you. I suppose if I really want to confuse people (again, pretty darned close to Perl 5):
my $compress = do { my $previous; sub ($x) { $x ne $previous ?? $previous = $x !! return; }; }
That works just fine, but it might give someone pause :) Of course, I wouldn't write it like that for production.
Cheers,
Ovid
New address of my CGI Course.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: 99 Problems in Perl6 (??=!!)
by tye (Sage) on Dec 16, 2006 at 00:39 UTC | |
by TimToady (Parson) on Dec 16, 2006 at 00:58 UTC |