in reply to sorting a hash that's in another file

Is there some reason you can't just copy the hash into your script manually, it appears to be the sort of data that is relatively static. Alternatively if you have access to the module that declares the hash is there some reason that you can't rewrite it to get that hash from a third module? eg. in both scripts:

use States; my %some_hash = %States::some_hash;

Replies are listed 'Best First'.
Re: Re: sorting a hash that's in another file
by alienhuman (Pilgrim) on Jul 24, 2003 at 14:44 UTC

    Tedrek,

    There is a reason: the file is frequently updated by other developers. Those developers are only concerned with adding items to each of the hashes within %some_hash. In other words, they are concerned with adding more birds to MASSACHUSETTS (quite a bunch of pro-environment developers here ;-) ). However, it is useful (IMHO) for us to be able to see which birds are associated with which states (names of keys/values have been changed to protect the innocent--the "birds" are actually user IDs and the "states" are various functions... long story).

    However, your idea to put the values in a separate module is excellent, and I will likely do just that (see my above reply).

    Cheers,

    AH