File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -209,10 +209,12 @@ it as a method, e. g. C<$fh.chmod(0o755)>.
209
209
= item chomp VARIABLE
210
210
211
211
The behavior of C < chomp > is different than in Perl 5. It leaves the
212
- target unaffected and I < returns > the target with a final logical newline
213
- removed. I. e . C < $x = "howdy\n";$y = chomp($x); > results in C < $x >
212
+ target unaffected and I < returns > a copy of the target with a final logical newline
213
+ removed, e.g . C < $x = "howdy\n";$y = chomp($x); > results in C < $x >
214
214
containing "howdy\n" and C < $y > containing "howdy". Also works as a
215
- method, i. e. C < $y = $x.chomp > .
215
+ method, e.g. C < $y = $x.chomp > . As with many other methods, also works
216
+ with assignment to modify the target in place, e.g. C < $x.=chomp > results
217
+ in C < $x > containing "howdy".
216
218
217
219
= head2 chop
218
220
You can’t perform that action at this time.
0 commit comments