perl: added 2049 logic (generate 1s; 2048 + 1 = 2049), and win logic (print "you win" and exit if 2049 reached)