in reply to Perl version dependent code

When I ran into this I came up with

BEGIN { *fold_case = CORE->can( 'fc' ) || CORE->can( 'lc' ) || sub { lc $_[0] }; }

The explicit sub is because if you go back far enough lc() is not exposed in the CORE:: name space.