fc

fc

fc EXPR

fc

Returns the casefolded version of EXPR. This is the internal function implementing the \F escape in double-quoted strings.

Casefolding is the process of mapping strings to a form where case differences are erased; comparing two strings in their casefolded form is effectively a way of asking if two strings are equal, regardless of case.

Roughly, if you ever found yourself writing this

lc($this) eq lc($that)    # Wrong!
    # or
uc($this) eq uc($that)    # Also wrong!
    # or
$this =~ /^\Q$that\E\z/i  # Right!

Now you can write

fc($this) eq fc($that)

And get the correct results.

Perl only implements the full form of casefolding, but you can access the simple folds using 登录查看完整内容