Pretty funny for a program that was over 500 lines long.
500 lines in perl? you're awful
I got an A for it since the teacher guessed I knew more about Perl than the rest of the class already.
He really gave you an A instead of bashing you for writing such stupid shit? whoa. College teachers these days..
lastly, while(<>) will not read until EOF, get your faqts str8.