On 07/12/2010 09:24, Jonathan Pool wrote:

Are you familiar with the perl debugger?

Thanks much for your reply. I haven't used the debugger, partly
because its documentation describes it as an interactive tool and
it's not clear to me how that works in my context. The script is
executed by httpd in response to a browser form submission, which
includes a file upload.

Alternatively you could take a look at the Tie::Watch module to do
asimilar thing without using the debugger.

I could look into using this. On the other hand, to get access to
the  variable's value one can use "warn" to write to the error log, and yet
that blocks the problem from occurring, so I can imagine that any other
method that reads the value and writes it somewhere will do the same.

I would like to see the Perl source to be able to be more helpful
to you.

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);

Cheers,

Rob

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to