Okay so I came across a code which looks like
@documents_names = sort {
!!$deleted_documents_names{$a} == !!$deleted_documents_names{$b}
? uc($a) cmp uc($b)
: !!$deleted_documents_names{$a}
cmp !!$deleted_documents_names{$b}
} @documents_names;
It's the first time I'm seeing the use of double negation. What's the use of it? When would a person use it?