perl.org wrote:
Given this piece of code (where ${components[${i}]} is 'email'):

    eval
    {
      my ${name} = 'IWAPI::ExternalTasks::' . ${components[${i}]};
      no strict;
      eval( &${name}( -files => [EMAIL PROTECTED], -area => ${area}, -wftask =>
${wftask}, -wfworkflow => ${wfworkflow} ));
      use strict;
    };

This gives "Use of uninitialized value at" regarding the inner eval.  If I
change this to:

IWAPI::ExternalTasks::email( -files => [EMAIL PROTECTED], -area => ${area}, -wftask =>
${wftask}, -wfworkflow => ${wfworkflow} );

Then I do not get this message, but that would mean a big switch in my script
which I would prefer to avoid. What would be happening differently when this
is invoked with eval that could cause this? I am 100% certain that all of the
variables shown here are defined.


Any clues would be greatly appreciated.

It's hard to tell without more context, but your inner eval looks like it should be of the form eval "STRING". I.E. put it in quotes. You'll have to figure out what needs to be escaped as there is not enough context for me to make a guess and I'm not familiar with IWAPI::*.


See `perldoc -f eval`

Randy.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to