in reply to please help me parse genbank DNA file

Wow! I like it...
Adding to what others have already pointed out:

Are you forgetting to open the $file?
You should probably chomp the trailing newline off of your filename before opening it. Not that important though, but it pays to be safe.
Its only short, foxy, I'd start again, but this time plan it before turning on your computer. Always helps!

SMiTZ