in reply to Re: main script invoked twice
in thread main script invoked twice

Third: The value of the $$ variable could be being modified by the "use Our::UI::CommandLine;" line. For example it could be set in the BEGIN block.

Erm, that's not exactly possible.

$ perl -le 'print $$; $$ = 1234; print $$' 11142 Modification of a read-only value attempted at -e line 1.

Underneath $$ is a call to getpid(2) and hence the value can't be modified directly.