On Sun, Aug 29, 2010 at 6:11 PM, Chas. Owens <[email protected]> wrote: > On Sun, Aug 29, 2010 at 07:15, Kaushal Shriyan <[email protected]> > wrote: >> Hi >> >> Can someone please explain me with an example of the usage chomp () >> builtin function in perl. > snip > > The chomp function removes whatever is in the $/ variable from the > argument passed in (or $_ if no argument is passed in). The default > value of $/ is "\n". It is often used after reading a line to remove > the newline ("\n"): >
Hi Chas $/ variable is a line separator variable whereas $_ is a default variable. Please explain me when you said no argument is passed so what i understand is chomp $line means $line is a argument ? Thanks Kaushal -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
