Help for this page
a Var's lifetime should be never preceed, or outlast, its usefulness Declare at the last possible moment; go out of scope at the earliest
my $XMLval=''; { ... # and @X is out of scope , # so no worries about it anymore or any other gobbltygook # in the braces