How to set far and near clipping plane of camera with scripting

I have a script attached to a player that creates a main camera when the game is played putting the camera as a child of the player object. Then i want to refer to that camera object and set values for the near and far clipping planes of that camera to reduce draw distance.