http://www.perlmonks.org?node_id=69953


in reply to if condition only returns false . . .

rand returns a floating point number between 0 and 1. The int operator takes the integer portion of that number, which will always be zero for numbers in the range [0, 1). Hence, always false!