|Perl Language Reference Manual|
by Larry Wall and others
Paperback (6"x9"), 724 pages
RRP £29.95 ($39.95)
Sales of this book support The Perl Foundation! Get a printed copy>>>
chop( LIST )
Chops off the last character of a string and returns the character
chopped. It is much more efficient than
s/.$//s because it neither
scans nor copies the string. If VARIABLE is omitted, chops
If VARIABLE is a hash, it chops the hash's values, but not its keys.
You can actually chop anything that's an lvalue, including an assignment.
If you chop a list, each element is chopped. Only the value of the
chop is returned.
chop returns the last character. To return all but the last
substr($string, 0, -1).
|ISBN 9781906966027||Perl Language Reference Manual||See the print edition|