[RndTbl] Funny comment
Sean Walberg
sean at ertw.com
Sat Feb 28 08:53:18 CST 2015
Thanks for pointing that out. TIL --> which is another example of "two
operators smashed together does something cool". Too bad it doesn't work in
Ruby, but it does in Perl:
$ perl -e '$x=3; print "hi\n" while ($x --> 0)'
hi
hi
hi
Sean
On Sat, Feb 28, 2015 at 1:38 AM, Trevor Cordes <trevor at tecnopolis.ca> wrote:
> I had to confirm what $x=!!$y meant in perl. Remarkably, typing !! or
> "!!" or \!\! into google gives you nothing. Had to use English.
>
> Got this:
>
>
> http://stackoverflow.com/questions/2168406/what-does-double-exclamation-point-mean
>
> The +42 answer is quite good. Exec summary: !! is good for cleaning vars
> into 1 (true) or '' (false), which is important to keep warnings from
> complaining about undef vars.
>
> Anyhow, read the comments in the +42 answer. Hehehe.
>
> Let the flamewars begin!
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.mb.ca
> http://www.muug.mb.ca/mailman/listinfo/roundtable
>
--
Sean Walberg <sean at ertw.com> http://ertw.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.muug.mb.ca/pipermail/roundtable/attachments/20150228/2273d0cd/attachment.html>
More information about the Roundtable
mailing list