You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
441 B
Perl

chomp VARIABLE
chomp LIST
chomp
chomp removes any line ending that corresponds to the current value of $/.
$/ is the special Perl variable holding the input record separator.
$/ is defaulting to a newline.
chomp function returns the total number of characters removed.
chomp is usually used to remove the newline from the end of an input record.
If VARIABLE is omitted, it chomps $_.
while (<>) {
chomp;
print;
}