Social robots are being used to create better educational scenarios, thereby fostering children's learning. In the work presented here, we describe an autonomous social robot that was designed to enhance children's handwriting skills. Exploiting the benefits of the learning-by-teaching method, the system provides a scenario in which a child acts as a teacher and corrects the handwriting difficulties of the robotic agent. To explore the children's perception towards this social robot and the effect on their learning, we have conducted a multi-session study with children that compared two contrasting competencies in the robot: 'learning'vs 'non-learning' and presented as two conditions in the study. The results suggest that the children learned more in the learning condition compared with the non-learning condition and their learning gains seem to be affected by their perception of the robot. The results did not lead to any significant differences in the children's perception of the robot in the first two weeks of interaction. However, by the end of the 4th week, the results changed. The children in the learning condition gave significantly higher writing ability and overall performance scores to the robot compared with the non-learning condition. In addition, the change in the robot's learning capabilities did not show to affect their perceived intelligence, likability and friendliness towards it.