in reply to Re^2: perl & XML: getting last child?
in thread perl & XML: getting last child?

I cannot get your code to work. Any ideas? thanks

Replies are listed 'Best First'.
Re^4: perl & XML: getting last child?
by Lotus1 (Vicar) on Apr 24, 2013 at 14:27 UTC

    Typically I look at the warnings and errors and fix any problems until the code will run. Then I look at the output to see if I'm getting the expected results and make changes and read the documentation for any modules or functions that aren't working like I expect. I also put in extra print statements to test my assumptions of how the code should work.

    The code I posted has a missing parenthesis but otherwise does what you requested. The second warning message points you to the exact line where this occurs.

    syntax error at C:\b\perlmonks\xml\1029217.pl line __, near "){"