Help for this page

Select Code to Download


  1. or download this
    package Chomp;
    use Scalar::Readonly ':all';
    ...
    print chomp $foo, $/;            # prints 2
    print chomp $bar, "\n";          # prints 1
    print chomp ($foo, $bar), "\n";  # prints 2
    
  2. or download this
    chomp($/);  # $/ = undef;