Look, this is a very advanced area. You have been advised already about tutorials. You really must improve your understanding before proceeding further.

Go to the metaploit site and read the examples and dialogues.

Yes, ruby does have the file extension .rb but it is not mandatory.
Yes perl does have the file extension .pl but it is not mandatory.

From your phraseology i suspect you are WAY out of your depth and therefore putting networks or systems at risk. We cannot condone that.

You must become more proficient before proceeding further.

Whilst this is a BackTrack forum and that which you describe is in the distribution, sometimes our best advice is to take a step back and research further.