What steps have you taken for yourself to find out what needs to be done? If you tell us where you are stuck that makes it much easier for us to suggest to you how to best approach your problem. This site is not a code writing service, so we expect you to do your work.
If you're wondering what functions to use, consider reading chomp.
If you're stuck with the overall logic, consider first writing a very simple program that doesn't do anything else other than joining together lines, instead of trying to make everything fit with your existing program.
In reply to Re^5: Gentleman, I'm lost.
by Corion
in thread Gentleman, I'm lost.
by Ryanjohns
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |