On Aug 16, Michel Rodriguez said:

>On Thursday 16 August 2001 1:57 pm, Joe Bellifont wrote:
>
>> the code you provided below produces an error at the "foreach" line.
>> --syntax error at line 12 , near "$field qw( FNAME SURNAME QDETAILS)"
>
>...
>> use Data::Denter;                # just to check what's read in by
>> XML::Simple
>
>This XML::Simple moved and, most annoyingly, got on the next line. I think 
>that' would be the cause of the syntax error. It was originaly part of the 
>comment on the use Data::Denter; line

Actually, the person getting the error is using a Perl less than
5.6.  Since Perl 5.6, qw() becomes a (...) list at compile-time, so saying

  for qw( a b c ) {
    ...
  }

is valid.  Beforehand, qw() became a split() at compile-time, and thus

  for qw( a b c ) {
    ...
  }

is a syntax error that must be written as

  for (qw( a b c )) {
    ...
  }

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to