in reply to data comparison

I'm pretty sure that Perl warns you about this line:

if( $f = $e ) {

Most likely you want to use one of the two equality comparison operators, == or eq instead of using an assignment expression here.