sub test { my ($arg) = @_; if ($arg == 1) { return 'hash1'; } elsif ($arg == 2) { return 'hash2'; } die; }