are you using strict and warnings ?
"While" should be "while". I think this is your main problem, since PERL thinks this is a call to a function rather than a while statement, so the {} following the While causes the error.
You should also be checking the result of the open in case it fails.
--
Brovnik
In reply to Re: Beginner needs help
by Brovnik
in thread Beginner needs help
by richmusk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |