in reply to Re^2: exit this way
in thread exit this way

In many other languages, main is "special". The unnamed programmers were attempting to make a facsimile of that "specialness".

Perhaps:

#!perl use strict; use warnings; main(); exit 99; # or other reasonable default exit value

might be better.

Replies are listed 'Best First'.
Re^4: exit this way
by Your Mother (Archbishop) on Sep 01, 2015 at 17:26 UTC

    Yes, and the attempt at the idiom is a reasonable idea, I have in fact used it for service/daemon style scripts in the past, but exit 0; # undef works too is the only "correct" exit code. Everything else is an error state. Since returning false is suggestive of an error in Perl I am reticent to put that lipstick on this pig... or this pig stick on those lips... And that's the way the news goes!