in reply to Beginner needs help
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
|
|---|