use java::awt::MouseInfo:from; given MouseInfo.getPointerInfo.getLocation { say .getX, 'x', .getY; }