Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl version dependent code (updated)

by haukex (Archbishop)
on Jan 24, 2019 at 20:29 UTC ( [id://1228945]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use if $] ge '5.016', feature => 'fc';
    use if $] lt '5.016', 'Unicode::CaseFold' => 'fc';
    
  2. or download this
    *case_insens = $] ge '5.016'
        ? sub { &CORE::fc($a) cmp &CORE::fc($b) }
        : sub { lc $a cmp lc $b };
    
    @list = sort {case_insens()} @list;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1228945]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-19 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found