Been using perl for a while but quite often encounter this, Say, $results is a hashref and code is like below:
$results->{'Key_1'} = 'Valid_string';
if ( $results->{'Key_1'} ) { ---> this doesn't return true
Code to do something .....
}
If my question is clear, Can anyone explain, why this happens?