Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: chmodChapter 5
Function Reference
Next: Reference: chop
 

chomp

chomp $var
chomp @list

Removes any line-ending characters of a string in $var, or each string in @list, that correspond to the current value of $/ (not just any last character, as chop does). chomp returns the number of characters deleted. If $/ is empty (in paragraph mode), chomp removes all newlines from the selected string (or strings, if chomping a list). If no argument is given, the function chomps the $_ variable.


Previous: Reference: chmodPerl in a NutshellNext: Reference: chop
Reference: chmodBook IndexReference: chop



Banner.Novgorod.Ru