Help for this page

Select Code to Download


  1. or download this
      sub remove_trailing_newlines( $ ) {
          my ( $stringref ) = @_;
    
          ${$stringref} =~ s/[\r\n]+\z//gs;
      }
    
  2. or download this
      remove_trailing_newlines( \$cmd );
      remove_trailing_newlines( \$check );