Works fine for me. Maybe you've accidentally changed the input record sepaprator $/ ?
In reply to Re: program hangs on user input by Anonyrnous Monk in thread program hangs on user input by equick