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]
Re: regular expressions and newline characters
Jeff 'japhy/Marillion' Pinyan Thu, 16 Aug 2001 08:01:51 -0700
- regular expressions and newline characters Joe Bellifont
- Re: regular expressions and newline cha... Michel Rodriguez
- Re: regular expressions and newline cha... Joe Bellifont
- Re: regular expressions and newline cha... Michel Rodriguez
- Jeff 'japhy/Marillion' Pinyan
