Help for this page

Select Code to Download


  1. or download this
    $ perl -wE 'my $str = "JA_PH"; $str =~ s/_/\s/; say $str'
    Unrecognized escape \s passed through at -e line 1.
    JAsPH
    $ perl -wE 'my $str = "JA_PH"; $str =~ s/_/ /; say $str'
    JA PH
    
  2. or download this
    $ perl -wE 'my $str = "Some text with  whitespace"; $str =~ s/\s /_/g;
    + say $str'
    Some text with_whitespace
    ...
    Some_text_with__whitespace
    $ perl -wE 'my $str = "Some text with  whitespace"; $str =~ s/\s+/_/g;
    + say $str'
    Some_text_with_whitespace