Help for this page

Select Code to Download


  1. or download this
    my $s = " foo bar baz";
    
    print join("|", split /\s+/, $s), "\n";  # prints  |foo|bar|baz
    print join("|", split ' ', $s), "\n";    # prints  foo|bar|baz