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)'hihihiSean--On Sat, Feb 28, 2015 at 1:38 AM, Trevor Cordes <trevor@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@muug.mb.ca
http://www.muug.mb.ca/mailman/listinfo/roundtable
Sean Walberg <sean@ertw.com> http://ertw.com/
_______________________________________________
Roundtable mailing list
Roundtable@muug.mb.ca
http://www.muug.mb.ca/mailman/listinfo/roundtable