Documentation for sub chop
Documentation for sub chop, assembled from the following types:
sub chop(Str(Cool))method chop()
Coerces the invocant (or in sub form, its argument) to Str, and returns it with the last character removed.
say 'perl'.chop; # OUTPUT: «per␤»
multi sub chop(Str --> Str)multi method chop(Str: = 1 --> Str)
Returns the string with
$chars characters removed from the end.