Koda Koda - 3 months ago 10
Perl Question

PERL syntax error near "= ) "

I have found this example but I get this error:


syntax error at ./test.pl line 11, near "= ) " Execution of ./test.pl
aborted due to compilation errors.


Line 11:
while($line = ) {

Answer

The author of the script didn't prepare the script to be included in an HTML. The actual code was

while ($line = <INFILE>) {

See readline for details.