AndrewMcHorney wrote:
> Hello

Hello,

> I am wondering how the chomp function works. I am looking to see how I
> can truncate new line and/or carriage returns from a string. Will chomp
> do nothing if there are no carriage return or line feed at the end. If
> the end of the string has a space will it leave it alone?

If $/ contains a string then chomp() removes the contents of the $/ variable
from the end of the string and it returns a count of the number of $/ that
were removed.  If $/ contains undef or a reference then chomp() does nothing.



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to