Update solution-01.pl

removed infinite loop