#!/usr/bin/perl use strict; my $hash_ref = &getHashRef(); # Check if hash reference has really values in it.... if ( $hash_ref ) { .....# do something }