in reply to Re^2: caller of perl script
in thread caller of perl script

moritz: OP mentioned a .BAT file. Is getppid implemented on Windows?

Concluding the operating system from a file extension is a fragile business. I think that mono uses .exe executables on linux.

Also there are a lot of different systems that use .BAT - the difference between DOS 6.0 and Windows 7 are striking.

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^4: caller of perl script
by jdrago999 (Pilgrim) on Jun 11, 2010 at 16:58 UTC
    What's wrong with $^O ?

      Whoops!

      c>$^O</c> is the name of the currently running script, not the name of the thing from which it was started.

        $0 actually is the name of current script.

        $^O is the name of the operating system, and what's wrong with it is documented in perlvar.

        Perl 6 - links to (nearly) everything that is Perl 6.

        No, I think you have confused $0, (dollar-zero) script name, with $^O, (dollar-caret-uppercase oh) operating system name.

        Cheers,

        JohnGG