in reply to Am I included?

if ($0 eq __FILE__) { # executed directly } else { # included via another script, such as with do or require or use }