in reply to Using UNDEF

Close.

if (!defined $foo_path) { print "\nFOO was not intended to run on OS:$^0\n" exit; }

Or even better

if (!defined $foo_path) { die "\nFOO was not intended to run on OS:$^0\n" }

Ref: defined, die

Update: Fixed stupid mistake pointed out in MidLifeXis's reply.
Update: Sigh! Fixed the second snippet too.

Replies are listed 'Best First'.
Re^2: Using UNDEF
by MidLifeXis (Monsignor) on May 22, 2008 at 16:59 UTC

    Almost - the if should be negated :).

    if (! defined $foo_path) {...}

    --MidLifeXis

Re^2: Using UNDEF
by Your Mother (Archbishop) on May 22, 2008 at 20:42 UTC

    Um... both ifs.