Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 773359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:57:04+00:00 2026-05-14T18:57:04+00:00

Any way for a perl script to know who called it and/or how? Be

  • 0

Any way for a perl script to know who called it and/or how?

Be it another script, or an executable. Straight from the command-line or the cron scheduler.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:57:05+00:00Added an answer on May 14, 2026 at 6:57 pm

    Tools to help track down how a Perl script was started:

    getppid returns parent process id. You can then use ps or /proc/<pid> to get more information about the calling process.

    $^X: full path to the perl interpreter, which may provide a clue about how Perl was started from the shell

    $0, __FILE__: name of the script invoked from the command line, and the current file name. If they are consistent, then the current file contains the script that was invoked from the command line.

    @ARGV: command line arguments passed to your script. With $^X, $0, and @ARGV, you know exactly how the Perl interpreter was started from the shell.

    caller: stack trace information. If caller returns undef at the start of a script, then you are at the top frame of the stack, and your script was invoked from the shell. Otherwise caller returns the package, file, and line where your script was invoked (with do or require).

    $^T: time (in seconds since the “epoch”) that the current Perl script was started, so you know when the current Perl interpreter was started from the shell. Use scalar localtime($^T) to see this value in a friendlier format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to trap an error and exit gracefully from Perl? I
Does anyone know of a free Perl program (command line preferable), module, or anyway
I want to know if there is any way to use Bash(Shell Script) to
I have a perl script (or any executable) E which will take a file
Is there any way to listen to an Oracle AQ using a Perl process
Is there any way to capture the MouseDown even from the .NET 2.0 TextBox
Does anyone know of an easy way to create a script that can connect
I have a Perl script that replaces any Us or Ns at the end
Consider the following perl script ( read.pl ): my $line = <STDIN>; print Perl
Is any way to tell the solution explorer of Visual Studio 2005 not to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.