in reply to Perl version dependent code

Isn't this easier?

use if $] ge '5.016', feature => 'fc'; BEGIN { eval 'fc 1' or eval 'sub fc ($) { lc $_[0] }' }; ...; @list = sort { fc $a cmp fc $b } @list;

Replies are listed 'Best First'.
Re^2: Perl version dependent code
by choroba (Cardinal) on Jan 25, 2019 at 10:40 UTC
    This should be a Babble plugin!

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]