On Sun, Aug 29, 2010 at 6:11 PM, Chas. Owens <chas.ow...@gmail.com> wrote: > On Sun, Aug 29, 2010 at 07:15, Kaushal Shriyan <kaushalshri...@gmail.com> > 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: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/