can you explain this perl command?

I am using this line of perl code to change the file format and remove ^M at the end of each line in files:

perl -i -pe's/\r$//;' <name of file here>

Can you explain to me what this code does, and translate it into bash/awk/sed?

you won't need code to remove ^M in a file... just use

dos2unix filewith^M newfile

Or open the file in vi and do this: :%s/<ctrl+v+m>//g