in reply to Re: Problem in parsing XML file using XMl::Twig
in thread Problem in parsing XML file using XMl::Twig
Actually it looks like $$titlename will dereference the scalar instead:
to OP: use strict; and use warnings; would have caught this saying something like Can't use string ("MyTitleString") as a SCALAR ref while "strict refs" in use at foo.pl line 1234.
But OP probably doesn't want to use $titlename as a scalar ref .. so the line qq[Title[\@Name="$$titlename"]] => should probably be:perl -wle 'use strict; my $bar = 3; my $foo = \$bar; print "$$foo"' # outputs: 3
qq[Title[\@Name="$$titlename"]] =>
to OP: use strict; and use warnings; would have caught this saying something like Can't use string ("MyTitleString") as a SCALAR ref while "strict refs" in use at foo.pl line 1234.
In Section
Seekers of Perl Wisdom