in reply to local creation still triggers "requires explicit package name" error

The creation is OK, but it happens inside the eval block (it is lexically local). Therefore, $sftp is not accessible from outside the block.
  • Comment on Re: local creation still triggers "requires explicit package name" error

Replies are listed 'Best First'.
Re^2: local creation still triggers "requires explicit package name" error
by c84032002 (Novice) on May 28, 2010 at 15:54 UTC
    I figured that was it. But I used the Eval approach to allow me some measure of monitoring and control. The script will be in production and automated though our Scheduling system. Is there a way to create a dummy or placeholder version of $sftp at the very beginning and then replace it by the actions in the Eval block?
      Just declare it (with my $sftp;) before your eval and remove the my from inside the eval.
        Worked like a charm! Thanks very much. Monks (should) rule!!