http://qs321.pair.com?node_id=529451


in reply to XML Parse, Spanish Elements

Firstly I would recommend adding:
use strict; use warnings;
to the top of your code and then go through and fix the errors it identifies.

You should normally use strict & warnings in all scripts unless they're one-liners or if there's a good reason not to.

Use strict would show you that these two scalars are not being defined:

Global symbol "$caption" requires explicit package name at ./xml_p.pl +line 87. Global symbol "$photo" requires explicit package name at ./xml_p.pl li +ne 88.
(your line numbers may vary)

Update: wow! it's been stripped down! well done, much easier to debug for you!