Re: Chomp method
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Wed, 26 Apr 2006 23:13:34 -0700
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
.
- References:
- Chomp method
- From: AndrewMcHorney
- Chomp method
- Prev by Date: Re: Chomp method
- Next by Date: Re: File search.
- Previous by thread: Re: Chomp method
- Next by thread: RE: Chomp method
- Index(es):
Relevant Pages
|
|