Help for this page

Select Code to Download


  1. or download this
    sub mchomp { 
      my @a=@_; 
    ...
      } 
      wantarray ? @a: $a[0]; 
    }
    
  2. or download this
      ## returns the modified string
      print mchomp $string;
    ...
      %new=mchomp %hash;print values %new;
      ## modifes the hash inplace
      mchomp \%hash;print values %hash;