scripting problem

I am trying to write a script that tells us whether the permissions for two files, whose names should be given as arguments to the script, are identical.
And if the permissions for the two files are identical, have to output the common permission field. or else output each filename, followed by its permission field....
do u hve any suggestions?? how can i approcah this