See dragonchild's post--he was dead on. I can't believe
I didn't see that your variable names were different. As
a side note, had you been using #!/usr/bin/perl -w
you would have gotten a warning about the variable names; that
is why dragonchild suggests getting in the habit of using it.