port reading

i am a fresher doing project using arduino. In the project i need to read a port and have to perform a task according to its value. can you suggest a method for doing this...

Depends on what you mean by 'a port'. There are loads of examples of interfacing with different hardware on the Playground page (http://arduino.cc/playground/).