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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Problem in parsing XML file using XMl::Twig
by ramya2005 (Scribe) on Aug 16, 2005 at 22:28 UTC | |
by davidrw (Prior) on Aug 16, 2005 at 22:35 UTC | |
by ramya2005 (Scribe) on Aug 16, 2005 at 22:41 UTC |
In Section
Seekers of Perl Wisdom