in reply to Using a value to add to xml line
As hippo has pointed out, you haven't really shown us any code. I'm guessing, however, that you have declared and are using $epname as a lexical variable within your "loop," and so the variable name vanishes when the loop is exited:
If you want a lexical $epname to exist and have the value it was given in the loop when it's outside the loop, do something like:while (some_condition_is_true()) { ... my $epname = some_string(); ... print "for debug: \$epname is '$epname' \n"; ... } $newTitle = $epname; # variable does not exist here
my $epname; while (some_condition_is_true()) { ... $epname = some_string(); # do NOT declare new variable ... } $newTitle = $epname; # variable exists, has value here
Give a man a fish: <%-{-{-{-<
|
|---|