in reply to They keep hittin the enter key.

YES! IT WORKED! THANK YOU VERY MUCH! If you have time could you explain that to me?

Replies are listed 'Best First'.
Re(2): They keep hittin the enter key.
by FoxtrotUniform (Prior) on Feb 11, 2003 at 06:04 UTC

    Basically, $message =~ s/[\r\n]+$//; does a substitution on the string $message, replacing one or more ([...]+) characters in the given class ([\r\n], the escape sequences for carriage return and line feed), as long as they're right before the end of the string ($). That's a really bare explanation of the regular expression; see perlrequick and perlretut for more detail.

    Regular expressions are one of Perl's sharpest tools: they can help you get a lot of work done in a hurry, but they aren't easy to use. Spending some time learning about them would be a good idea, but don't get discouraged if you don't "get it" right away.

    --
    F o x t r o t U n i f o r m
    Found a typo in this node? /msg me
    The hell with paco, vote for Erudil!

Re: Re: They keep hittin the enter key.
by amrangaye (Friar) on Feb 11, 2003 at 10:56 UTC
    You might also want to check out this tutorial. It's a great intorduction to regexps from Simon Cozen's book, Beginning Perl, Wrox Press. Matter of fact, you'll probably want to read the whole book here. It's a great gentle introduction to most of Perl.