Content deleted Content added
→CharAt: Add Perl 5 snippet and showcase only the requested example for Perl 6 |
→Compare (integer result): Add Perl 5 and Perl 5 snippet |
||
Line 317:
|[[PL/I]]<ref name="lower1">IBM extension.</ref>
|}
<syntaxhighlight lang="perl">
# Example in Perl 5
"hello" cmp "world"; # returns -1
</syntaxhighlight>
<syntaxhighlight lang="perl6">
# Examples in Perl 6
"hello" cmp "world"; # returns Less
"world" cmp "hello"; # returns More
"hello" cmp "hello"; # returns Same
</syntaxhighlight>
<syntaxhighlight lang="python">
# Example in Python
|