Help for this page

Select Code to Download


  1. or download this
        $_ = 'XABX';
        print "<$_>" for split /A|B/;
    ...
        <X>
        <>
        <X>
    
  2. or download this
        'X' . 'A' . 'BX' # 'A' matched.
        'BX'             # 'A' removed, 'X' returned.
        '' . 'B' . 'X'   # 'B' matched.
        'X'              # 'B' removed, '' returned.