my $line = "hello\n"; my $x = chomp $line; print $x; # prints "1"