Help for this page

Select Code to Download


  1. or download this
      DB<113> split ' ', 'abc  def'
     => ("abc", "def")
    ...
    
      DB<117> split $del, 'abc  def'
     => ("abc", "def")
    
  2. or download this
                   As a special case, specifying a PATTERN of space (' ') 
    +will
                   split on white space just as "split" with no arguments 
    +does.
    ...
                   "/\s+/" is like a "split(' ')" except that any leading
                   whitespace produces a null first field.  A "split" with
    + no
                   arguments really does a "split(' ', $_)" internally.