http://www.perlmonks.org?node_id=850341

astroboy has asked for the wisdom of the Perl Monks concerning the following question:

Hi - is there any OS-generic way (Windows & *nix) - using a CPAN module or not - to tell from inside my script whether it's running in the foreground or the background?