Why can't I set GetComponent(Some_Component).enabled = false; ?

Sorry for the newbie question. I have noticed that this gives me an error ('enabled' is not a member of 'UnityEngine.Component':

mainCamera.GetComponent(AudioListener).enabled = false;

But this seems to be work fine:

var myListener:AudioListener = mainCamera.GetComponent(AudioListener);

myListener.enabled = false;

Is there a way to access the component without using a variable?

The way to do it without creating a variable is to cast the Component to an AudioListener:

(mainCamera.GetComponent(AudioListener) as AudioListener).enabled = false;

The compiler is right, "enabled" is not a member of Component. AudioListener inherits from Component, so it's got some extra things. But if you look at the docs for GetComponent, you'll notice that it returns a Component. What you're doing in your second example is implicitly casting the component that is returned as an AudioListener. The explicit way to do it would be

var myListener = mainCamera.GetComponent(AudioListener) as AudioListener;

Ad any rate, you can safely expect that when you call GetComponent with the type AudioListener, it can be cast as an AudioListener. If you don't want to explicitly declare a temporary variable, the following should work:

(mainCamera.GetComponent(AudioListener) as AudioListener).enabled = false;

My personal preference is to leave the temporary variable, as it's more human-readable, and a little bit clearer what you're doing without all those parentheses, but that's just me (and probably a number of other people, as well).