hey people hope you all are doing well

For class I must create my own encryption algorithm. My question is how do i program a key size. I am going to attempt to program this in Perl. How would I break the message up into a specified block size? Is there a particular module that would help me accomplish this? or is it built in? Would you consider Perl a good language to do this?