From: Rob Dixon <[email protected]>
> On 07/12/2010 09:24, Jonathan Pool wrote:
> > The current script where the error occurs is at
> >
> > http://panlex.svn.sourceforge.net/viewvc/panlex/perl/plxu.cgi?revision=27&view=markup
> >
> > The error occurs at line 1297.
>
> So the line in question is
>
> @res = (split /\n\n/, ($in{res} = (&NmlML ($in{res}))), -1);
>
> and, although I can see no proper reason why it should make any
> difference in this case, I recommend removing the ampersand from the
> function call: it is bad practice in anything but very old Perl. I would
> also prefer to lose a few parentheses, purely for the sake of
> readability. So please try this:
>
> @res = split(/\n\n/, $in{res} = NmlML($in{res}), -1);
I'd also suggest splitting this line in two. I feel uneasy about an
assignment to a variable that was used to compute the assigned value
somewhere in the middle of a parameter list ...
$in{res} = NmlML($in{res});
@res = split(/\n\n/, $in{res}, -1);
Jenda
===== [email protected] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/