Your
while (<>) is causing an infinite loop. Get rid of it, and just use
foreach, putting your print statement in there.
Update : Sherlock beat me to the punch. Use your ++'s on him instead.
Azatoth a.k.a Captain Whiplash
Make Your Die Messages Full of Wisdom!
Get YOUR PerlMonks Stagename here!
Want to speak like a Londoner?