$/ is newline by default https://perldoc.perl.org/perlvar#%24%2F That makes chomp remove only one newline.
$/ is newline by default /perldoc. perl.org/ perlvar# %24%2F
https:/
That makes chomp remove only one newline.