in reply to How to Find the Script that Called it

Sounds like you are using back ticks or do to access a script that very likely should be a module. Once it's a module it is trivial to add special case behavior for different contexts.

Even if you insist on executing the main script rather than calling it, you can pass optional parameters on the command line in the case where you need special processing. Do that just for the unusual case and you only need to alter the special case execution code to add the new parameter.


Perl's payment curve coincides with its learning curve.
  • Comment on Re: How to Find the Script that Called it