Thank you perlmonks for the help.
substr works fine in my case. yeah, this is by no means a robust encryption.
One more question: How do i skip the first and last lines of the file from this substitution? The first and last lines are headers and footers of the file and needs to be preserved.
thanks. I am revisiting perl after a long time and am rusty. So, appreciate all your help.