If what you want is to get rid of any trailing newlines, but not do anything if there aren't any, take a look at chomp, which is a more intelligent version of chop.
In reply to Re: chop is chopping off the last letter
by plaid
in thread chop is chopping off the last letter
by vtprogrammer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |