in reply to extracting a list from a file

The mistake is that you are splitting on $line, which you never assigned a value to, so your variables are always empty. Perhaps you meant to say while($line = <PAGE>) {.