Content deleted Content added
→right: Add Perl 6 section |
→split: Add Perl 6 section |
||
Line 2,456:
|-
| <code>split(/''separator''/, ''string''«, ''limit''»)</code>
|[[Perl 5]]
|-
| <code>split(''separator'', ''string''«, ''limit''»)</code> <br /> <code>''string''.split(''separator'', «''limit''»)</code>
|[[Perl 6]]
|-
| <code>explode(''separator'', ''string''«, ''limit''»)</code>
Line 2,546 ⟶ 2,549:
<syntaxhighlight lang="perl">
# Examples in Perl 5
split(/spam/, 'Spam eggs spam spam and ham'); # ('Spam eggs ', ' ', ' and ham')
split(/X/, 'Spam eggs spam spam and ham'); # ('Spam eggs spam spam and ham')
|