Help for this page

Select Code to Download


  1. or download this
        As with regular pattern matching, any capturing parentheses that
        are not matched in a "split()" will be set to "undef" when
    ...
    
            @fields = split /(A)|B/, "1A2B3";
            # @fields is (1, 'A', 2, undef, 3)