The usage can be found here: http://www.cypherspace.org/rsa/story2.html
If the code is place in a file called rsa, then it can be run with arguments -k for the key. The file to encrypt / decrypt is read from STDIN, and the result is written to STDOUT.
In short: to encrypt to a public key:
rsa -k=public-key -n=rsa-modulus < msg > msg.rsa
And to decrypt the message with the private key
rsa -k=private-key -n=rsa-modulus < msg.rsa > msg.out
The Perl code is a condensed version of the already small code which can be found here: