$files{$key}will really return the value of this key. But what if this value turns out to be false in a boolean context, for example, 0or ''(empty string)?
Consider this hash:
my %foo = ( red => 42, blue => 0, green => '', yellow => undef );
if ( $foo{blue} ), . , blue, , $foo{blue} . green yellow - undef .
exists () , - , , . ( keys, grep , .)
. exists .