in reply to Executing a command after the preceding command finished processing

You cannot reliably suspend Perl compiling until another command runs – I do not think that BEGIN would serve you here. Instead, run the predecessor command, then run the Perl script.
  • Comment on Re: Executing a command after the preceding command finished processing

Replies are listed 'Best First'.
Re^2: Executing a command after the preceding command finished processing
by Your Mother (Archbishop) on Mar 30, 2018 at 16:38 UTC

    You really should hush.

    # File: Mod.pm package Mod; sub import { print `date`; sleep 10 }; 1; # File: code.pl BEGIN { print `date` } use Mod; I'm a little tea pot. # Command line- moo@cow~>perl code.pl || date Fri Mar 30 09:37:09 PDT 2018 Fri Mar 30 09:37:09 PDT 2018 syntax error at code.pl line 3, at EOF Execution of code.pl aborted due to compilation errors. Fri Mar 30 09:37:19 PDT 2018
Re^2: Executing a command after the preceding command finished processing
by Laurent_R (Canon) on Mar 30, 2018 at 17:53 UTC
    I think that the OP really meant "execute," not "compile":
    ... needs time to process before the next (and final) line should compile execute...
      I did indeed mean execute, sorry about that. Corrected.