# Make sure AI doesn't try to 'move' if it has no available moves left print "Checking available AI moves\n"; my @availMovers = grep defined( $p2ships{ $_ } ) && $p2ships{ $_ }{ mc } != 1, keys %p2ships;